Posted 21 February 2014 - 08:05 PM
Here's the program I'm trying to make, it's only defining and testing a function. It's eventually going to be part of my own mining program. The sad thing is that it's one of five functions I've theoretically written for this mining program and it's the first one I'm testing. The turtle runs the program, doesn't return an error, but doesn't move or break blocks, whether blocks are in front of it or not. Any and all help would be appreciated by this noob.
edit:
Here's my code.
function forward()
turtle.detect()
if turtle.detect()==true
then turtle.dig()
forward()
if turtle.detect()==false
then turtle.forward()
end
end
for i=1,3 do
forward()
end
end
edit:
Here's my code.
function forward()
turtle.detect()
if turtle.detect()==true
then turtle.dig()
forward()
if turtle.detect()==false
then turtle.forward()
end
end
for i=1,3 do
forward()
end
end
Edited on 21 February 2014 - 10:58 PM