Posted 19 April 2013 - 10:19 AM
Hello, I'm a noob who can't figure out why the else part of an if/there/else statement won't work. I don't know how to use paste-bin so I'll just type my simple code for trying to make a tree farming robot. p.s.the error is a bios:338 on line 10 which is where the else is and it says an = is expected.
turtle.compare()
if true then
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
reboot
else
turtle.dig()
then i tell it to keep digging up the tree.
turtle.compare()
if true then
turtle.turnLeft()
turtle.turnLeft()
turtle.forward()
turtle.forward()
turtle.forward()
turtle.forward()
reboot
else
turtle.dig()
then i tell it to keep digging up the tree.