1 posts
Posted 20 July 2013 - 06:04 PM
I've been writing a branch mine tunneling program, and it's been working fine until it hits gravel. I've been trying to gravel-proof it and for some reason every loop I try is ruining the program, with the turtle getting stuck in some forward digging loop. For the tunnels I've been trying things like this:
http://pastebin.com/z4YD29ne
8543 posts
Posted 20 July 2013 - 11:18 PM
Split into new topic.
191 posts
Posted 21 July 2013 - 07:39 PM
for i=1,6 do
for i=1,20 do-- Why have two loops inside eachother?
turtle.dig()
turtle.forward()
if turtle.forward() == false then -- THIS confuses me...
repeat
turtle.dig()
sleep(0.25)
until turtle.forward() == true
end
end
end
This program ks vry confusing to me.. I suppose you want to mine 120 blocks.. Fixed code here
for i=1,120 do
turtle.dig()
while turtle.forward() == false do
turtle.dig()
sleep(0.25)
end
end