Posted 12 January 2014 - 02:19 PM
Hello! I am trying to make a turtle pathfinding program, but he just gets stuck in an infinite loop. Any help?
Code:
(The stop sign for the turtle.)
Code:
turtle.select(1)
while true do
if turtle.compare() then
break
end
if turtle.detect() then
turtle.turnLeft()
else
turtle.digDown()
turtle.forward()
if turtle.detectDown() then
turtle.turnRight()
turtle.turnRight()
turtle.forward()
end
end
end
In the turtles 1st slot there is glowstone(The stop sign for the turtle.)
Edited on 12 January 2014 - 01:43 PM