Posted 14 October 2014 - 05:37 PM
I isolated the problem but still can't see the problem with it, the turtle keeps going forward an extra 3-7 blocks randomly whether its mining anything or not. I did a little searching on Google and as far as I can see the repeat and for are written correctly it just doesn't work correctly.
function BlockTest()
if turtle.forward() == false then
repeat
turtle.dig()
sleep(0.5)
until turtle.forward() == true
end
end
for n = 1,10,1 do --[[ I added the last 1 just to rule out any chance that it was the cause ]]--
turtle.dig()
turtle.forward()
BlockTest()
end