Posted 31 January 2015 - 01:44 PM
I'm trying to run the following program:
Every time I try, I get this error:
There's definitely a "then" in line 3, so I'm not sure what it's complaining about. Ideas?
EDIT: Never mind, I'm an idiot. Just noticed I was using = instead of ==.
while true do
event, param1 = os.pullEvent()
if event = "redstone" then
if param1 = "left" or param1 = "top" then
if redstone.getInput("left") = true and redstone.getInput("top") = true then
redstone.setBundledOutput("right", colors.yellow)
sleep(0.5)
redstone.setBundledOutput("right", 0)
elseif redstone.getInput("left") = false and redstone.getInput("top") = false then
redstone.setBundledOutput("right", colors.magenta)
sleep(0.5)
redstone.setBundledOutput("right", 0)
end
end
end
end
Every time I try, I get this error:
bios: 339: [string "startup"]: 3: 'then' expected
There's definitely a "then" in line 3, so I'm not sure what it's complaining about. Ideas?
EDIT: Never mind, I'm an idiot. Just noticed I was using = instead of ==.
Edited on 31 January 2015 - 12:52 PM