Posted 03 January 2013 - 06:22 AM
Hi there,
I'm trying to build a home security script in computercraft (lua), but I cant get it to work.
I have tried to google it, even tried to write it all over, but still no luck.
With this script:
i get the following error:
I hope you guys can help me out.
Thanks in advance,
Dean
I'm trying to build a home security script in computercraft (lua), but I cant get it to work.
I have tried to google it, even tried to write it all over, but still no luck.
With this script:
while true do
if colours.test(rs.getBundledInput("top", colours.purple)) then
alarmSensors()
end
sleep(0.5)
if (rs.getInput("front")) then break end
end
function alarmSensors()
if(colours.test(rs.getBundledInput("right"), colours.red) || colours.test(rs.getBundledInput("right"), colours.green)) then
rs.setBundledOutput("right", colours.lime)
rs.setBundledOutput("top", colours.cyan)
sleep(30)
else
print("Building secure")
end
end
i get the following error:
bios:206: [string "protect"]:16: ' ) ' expected
I hope you guys can help me out.
Thanks in advance,
Dean