0

Lua in ComputerCraft 1.5

This seems to work but the recursive loops is breaking after 4 or 5 times running.

Cannot seem to see why.

Am i doing something incredibly wrong here? Full Code


Snippet for the loop:

x = 1

function loop()
 if x > 0 then
  getTarg()
  derp1()
  sleep(2.9)
  monInit()
  loop()
 end
end

loop()
Colonel Thirty Two
  • 23,953
  • 8
  • 45
  • 85
Derple
  • 865
  • 11
  • 28

1 Answers1

1

It looks as though you are not even using the X var... so why don't you try this... this is a more effective way to keep doing the same thing over and over

while true do
    getTarg()
    derp1()
    sleep(2.9)
    monInit()
end
Alan Doyle
  • 98
  • 16