Posted 06 January 2014 - 02:03 PM
Hello
I have been playng aroud with Direwolf20 fead the beast and mining turtles.
but they stop going forward för some reason…
I have a simple program and I had the turtle fail when I used 2 different while loops with os.sleep(0.5) in them…
when I added the RED line of code the turtle stopped going forward… and I cant get it fixed, all turtles stop going forward,
excavate still works though.
program: (it digs a 3 high corridor and places torches when it works.)
local run = 0
term.write("length: ")
run = read()
for i = 0, run do
while turtle.detect() do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp() do
turtle.digUp()
os.sleep(0.5)
end
turtle.digDown()
if(i %6) == 1 then
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.select(16)
turtle.placeUp()
turtle.turnLeft()
turtle.forward()
end
end
turtle.turnLeft()
turtle.turnLeft()
for i = 0, run do
turtle.forward()
end
I have been playng aroud with Direwolf20 fead the beast and mining turtles.
but they stop going forward för some reason…
I have a simple program and I had the turtle fail when I used 2 different while loops with os.sleep(0.5) in them…
when I added the RED line of code the turtle stopped going forward… and I cant get it fixed, all turtles stop going forward,
excavate still works though.
program: (it digs a 3 high corridor and places torches when it works.)
local run = 0
term.write("length: ")
run = read()
for i = 0, run do
while turtle.detect() do
turtle.dig()
os.sleep(0.5)
end
turtle.forward()
while turtle.detectUp() do
turtle.digUp()
os.sleep(0.5)
end
turtle.digDown()
if(i %6) == 1 then
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
turtle.select(16)
turtle.placeUp()
turtle.turnLeft()
turtle.forward()
end
end
turtle.turnLeft()
turtle.turnLeft()
for i = 0, run do
turtle.forward()
end