ok, so i created a script to cut down a 1x1 tree, and whenever i try to run it, the turtle won't do anything besides go back to the terminal to let me type something else in.
So, when i try to run it nothing happens. i'm still learning LUA, so there are probably some things wrong here. can anybody help me out?
oh, and it'd be awesome if someone showed me how to loop this so it runs 24/7
Code:
function plant()
turtle.select(1) --select sapling
turtle.place()
turtle.select(2) --select bonemeal
turtle.place()
turtle.select(3) --select bonemeal
turtle.place()
turtle.select(4) --select bonemeal
turtle.place()
turtle.select(5) --select bonemeal
turtle.place()
end
function cut()
turtle.dig()
turtle.forward()
while turtle.detectUp() == true do
turtle.digUp()
turtle.up()
end
end
function down()
while turtle.detectUp() == false do
turtle.down()
turtle.suck()
end
end
So, when i try to run it nothing happens. i'm still learning LUA, so there are probably some things wrong here. can anybody help me out?
oh, and it'd be awesome if someone showed me how to loop this so it runs 24/7