Posted 29 June 2013 - 08:45 AM
Title: Help with loops and if statements
Hello!
I am new to computercraft and I have only made a tunnel digging program.
I'm trying to make a woodcuting progrma were the turtle waits, when he receives a redstone signal he will go forward once and cut the tree.
If he doesn't get a redstone signal he will wait 10 secconds and try again.
This is the code I tried:
——————————————————————————
if turtle.getInput(left) then
(All commands for cuting the tree I didn't have time to write it all)
else
sleep(10)
end
—————————————————————————–
Please help me!
Hello!
I am new to computercraft and I have only made a tunnel digging program.
I'm trying to make a woodcuting progrma were the turtle waits, when he receives a redstone signal he will go forward once and cut the tree.
If he doesn't get a redstone signal he will wait 10 secconds and try again.
This is the code I tried:
——————————————————————————
if turtle.getInput(left) then
(All commands for cuting the tree I didn't have time to write it all)
else
sleep(10)
end
—————————————————————————–
Please help me!