Posted 19 May 2012 - 05:23 PM
I've made this program. It's a (simple) turtle lumberjack.
But if I run it, the turtle just says 12.
There's something wrong with this part, but I dont get what…..
Here's the whole code:
sorry 4 bad english^^
Robus
But if I run it, the turtle just says 12.
There's something wrong with this part, but I dont get what…..
Spoiler
else while not turtle.detect() do
turtle.back()
turtle.back()
sleep(2)
turtle.forward()
turtle.forward()
Here's the whole code:
Spoiler
term.clear()
term.setCursorPos(1,1)
x = 0
y = 0
while true do
if y == 0 then
turtle.up()
turtle.placeDown()
turtle.back()
y = y+1
if turtle.detect() then
y = y-1
turtle.dig()
turtle.digDown()
else while not turtle.detect() do
turtle.back()
turtle.back()
sleep(2)
turtle.forward()
turtle.forward()
while turtle.detectUp() do
turtle.digUp()
turle.up()
x = x+1
end
while x > 0 do
turtle.down()
end
end
end
end
sorry 4 bad english^^
Robus