Posted 08 April 2016 - 12:54 AM
Ok so I tried running my program so that it will mine a 3x3 tunnel for me but it wont run. Whenever I type mine in the shell so that it will start it doesn't give any errors but the turtle just sits there.
function up()
turtle.up()
end
function down()
turtle.down()
end
function f()
turtle.forward()
end
function b()
turtle.back()
end
function r()
turtle.turnRight()
end
function l()
turtle.turnLeft()
end
function du()
turtle.dig()
end
function dd()
turtle.digDown()
end
function df()
turtle.dig()
endfunction checkFuel()
if turtle.getFuelLevel() <= 10 then
for i=1, 16 do
turtle.select(i)
turtle.refuel(i)
end
end
checkFuel()
write("How many blocks: ")
r = read()
for i=1,r do
df()
f()
r()
df()
f()
df()
du()
up()
l()
l()
df()
f()
df()
du()
up()
r()
r()
df()
f()
df()
down()
down()
l()
l()
f()
r()
checkFuel()
end
for i=1,r do
turtle.back()
end
turtle.turnRight()
for i=1,16 do
turtle.select(i)
turtle.transferTo(i)
end
end