Posted 04 June 2014 - 04:58 PM
Basically I just want the turtle to loop this code, when I type the command name "farm" then it will do the code perfectly but only once.
usually I would do "while true do" at the start but I keep getting the message [string "farm"] :15: 'end' expected (to close 'while' at line 1)
if turtle.detect() then
turtle.select(1) <—bonemeal
turtle.place()
turtle.place()
turtle.place()
end
if not turtle.detect() then
turtle.select(2) <—sapling
turtle.place()
end
That is the code without the "while true do". Can I implement a loop into this code using while true do?
usually I would do "while true do" at the start but I keep getting the message [string "farm"] :15: 'end' expected (to close 'while' at line 1)
if turtle.detect() then
turtle.select(1) <—bonemeal
turtle.place()
turtle.place()
turtle.place()
end
if not turtle.detect() then
turtle.select(2) <—sapling
turtle.place()
end
That is the code without the "while true do". Can I implement a loop into this code using while true do?