Posted 13 April 2012 - 01:52 AM
Hey I was making a program to have a turtle detect a tree then cut it down even when I am away but I get the error bios:206: [string "startup"]:12:'<eof>' expected
The code is:
x = 0
while true do
term.clear()
term.setCursorPos(1,1)
write("Waiting")
textutils.slowPrint("…")
sleep(0)
if turtle.detect() == false then
sleep(1)
end
end
elseif turtle.detect() == true then
break
end
end
x = 0
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Cutting…")
turtle.dig()
turtle.forward()
while true do
x = x + 1
turtle.digUp()
turtle.up()
if turtle.digUp() == false then
break
end
end
while true do
x = x - 1
turtle.down()
if x == 0 then
turtle.back()
turtle.drop()
os.reboot()
end
Not sure why it won't show the spaces but there are spaces
The code is:
x = 0
while true do
term.clear()
term.setCursorPos(1,1)
write("Waiting")
textutils.slowPrint("…")
sleep(0)
if turtle.detect() == false then
sleep(1)
end
end
elseif turtle.detect() == true then
break
end
end
x = 0
term.clear()
term.setCursorPos(1,1)
textutils.slowPrint("Cutting…")
turtle.dig()
turtle.forward()
while true do
x = x + 1
turtle.digUp()
turtle.up()
if turtle.digUp() == false then
break
end
end
while true do
x = x - 1
turtle.down()
if x == 0 then
turtle.back()
turtle.drop()
os.reboot()
end
Not sure why it won't show the spaces but there are spaces