Its pretty sad, but I can't get this simple cc program to work. Any help would be appreciated. The intention is to output a redstone signal to a redpower filter positioned behind the turtle after every 10th successful hit. It quits with an error (boolean expected) on line 10, which is (redstone.setOutput(back, false))
I'm sure I'm doing something completely stupid, please point it out for me.
This is the code:
local hit = 0
while true do
if turtle.attack() then
hit = hit +1
end
if hit >= 10 then
hit = 0
redstone.setOutput(back, true)
end
redstone.setOutput(back, false)
end
I'm sure I'm doing something completely stupid, please point it out for me.
This is the code:
local hit = 0
while true do
if turtle.attack() then
hit = hit +1
end
if hit >= 10 then
hit = 0
redstone.setOutput(back, true)
end
redstone.setOutput(back, false)
end