r/ComputerCraft • u/AAQsR • Jan 17 '16
Error message help.
When I run the following code in a turtle, I get an error message. Please help, I am new to computercraft and lua.
while rs.getAnalogInput("right") true
do turtle.dig()
1
Upvotes
3
u/eniallator Jan 17 '16
if you want the turtle to infinitely run but only do the dig function when its getting a redstone signal then use this code:
while true do
if redstone.getInput("right") then
turtle.dig()
end
end1
3
u/martmists Jan 17 '16 edited Jan 17 '16
(Fixed it :D)