Posted 19 June 2012 - 12:05 AM
Hello, I'm creating a flashing light bar and i'm getting a lot of different error messages, can someone tell me what's wrong with this code?
x = 1
while x < 5 do
all = colors.combine(colors.magenta , colors.cyan , colors.light-grey , colors.purple , colors.orange , colors.lightBlue , colors.yellow , colors.pink)
rs.setBundledOutput("back", colors.magenta)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.magenta)
rs.setBundledOutput("back", colors.cyan)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.cyan)
rs.setBundledOutput("back", colors.light-grey)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.light-grey)
rs.setBundledOutput("back", colors.purple)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.purple)
rs.setBundledOutput("back", colors.orange)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.orange)
rs.setBundledOutput("back", colors.lightBlue)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.lightBlue)
rs.setBundledOutput("back", all)
sleep(1)
rs.setBundledOutput("back", 0)
rs.setBundledOutput("back", all)
sleep(1)
rs.setBundledOutput("back", 0)
sleep(1)
end
Also can someone tell me how to continue this loop without the computer crashing? Thanks
x = 1
while x < 5 do
all = colors.combine(colors.magenta , colors.cyan , colors.light-grey , colors.purple , colors.orange , colors.lightBlue , colors.yellow , colors.pink)
rs.setBundledOutput("back", colors.magenta)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.magenta)
rs.setBundledOutput("back", colors.cyan)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.cyan)
rs.setBundledOutput("back", colors.light-grey)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.light-grey)
rs.setBundledOutput("back", colors.purple)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.purple)
rs.setBundledOutput("back", colors.orange)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.orange)
rs.setBundledOutput("back", colors.lightBlue)
sleep(0.5)
rs.setBundledOutput("back", rs.getBundledOutput("back") - colors.lightBlue)
rs.setBundledOutput("back", all)
sleep(1)
rs.setBundledOutput("back", 0)
rs.setBundledOutput("back", all)
sleep(1)
rs.setBundledOutput("back", 0)
sleep(1)
end
Also can someone tell me how to continue this loop without the computer crashing? Thanks