Posted 29 November 2012 - 03:32 AM
Hi, I've just started with ComputerCraft and I'm still learning the basics.
I am working creating an alarm system which enables a howler alarm and makes all the lights flash in my house.
It worked when I used it with normal redstone alloy wires. But now I'm using bundled cables and I can't seem to get it to work:
Now the problem is: it gives me the following error once i've typed 1
bit:40: bad argument: double expected, got nil
Also how do I make it loop? turn on one second, turn off one second and loop that
Thanks in advance!
I am working creating an alarm system which enables a howler alarm and makes all the lights flash in my house.
It worked when I used it with normal redstone alloy wires. But now I'm using bundled cables and I can't seem to get it to work:
term.clear()
term.setCursorPos(1,1)
print("1 = on")
print("2 = on")
input = read()
answer1 = "1"
if input == answer1 then
term.clear()
c = colors.subtract( c, colors.orange )
rs.setBundledOutput("top", colors.orange )
sleep(1)
rs.setBundledOutput("top", c )
shell.run("system")
end
Now the problem is: it gives me the following error once i've typed 1
bit:40: bad argument: double expected, got nil
Also how do I make it loop? turn on one second, turn off one second and loop that
Thanks in advance!