Posted 27 June 2012 - 09:50 PM
Hello there! I'm currently trying to work out a program that is playing The Edge of Glory(from NBS) on noteblocks. I have set everything up with noteblocks and bundled cables and it works fine for like 5 sec(havent coded more than maybe 6-7 seconds of the song).
After that 5 second mark I get "edge:72:Bad argument: int expected, got nil"
here is my code, I'm sorry if its "messy" or hard to understand, this is one of my first programs and I'm very new to programing overall.
I know that line 72 is
After that 5 second mark I get "edge:72:Bad argument: int expected, got nil"
here is my code, I'm sorry if its "messy" or hard to understand, this is one of my first programs and I'm very new to programing overall.
term.clear()
term.setCursorPos(1,1)
print("would you like to hear Edge of glory?")
print("yes")
print("no")
input = read()
answer = "yes"
term.clear()
if input == answer then
print("Enjoy!")
sleep(.2)
rs.setBundledOutput("right", colors.orange)
sleep(.2)
rs.setBundledOutput("right", colors.cyan)
sleep(.1)
rs.setBundledOutput("right", colors.black)
sleep(.1)
rs.setBundledOutput("right", colors.cyan)
sleep(.1)
rs.setBundledOutput("right", colors.black)
sleep(.1)
rs.setBundledOutput("right", colors.cyan)
sleep(.05)
rs.setBundledOutput("right", colors.black)
sleep(.05)
rs.setBundledOutput("right", colors.cyan)
sleep(.3)
rs.setBundledOutput("right", colors.magenta)
sleep(.1)
rs.setBundledOutput("right", colors.black)
sleep(.1)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.lightGray)
sleep(.2)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.lightGray)
sleep(.2)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.lightGray)
sleep(.2)
rs.setBundledOutput("right", colors.white)
sleep(.4)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.cyan)
sleep(.2)
rs.setBundledOutput("right", colors.purple)
sleep(.4)
rs.setBundledOutput("right", colors.lime)
sleep(.2)
rs.setBundledOutput("right", colors.purple)
sleep(.2)
rs.setBundledOutput("right", colors.white)
sleep(.2)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.yellow)
sleep(.2)
rs.setBundledOutput("right", colors.cyan)
sleep(.2)
rs.setBundledOutput("right", colors.purple)
sleep(.4)
rs.setBundledOutput("right", colors.lime)
sleep(.2)
rs.setBundledOutput("right", colors.lightgray)
sleep(.2)
rs.setBundledOutput("right", colors.magenta)
sleep(.2)
rs.setBundledOutput("right", colors.purple)
sleep(.4)
rs.setBundledOutput("right", colors.blue)
sleep(.2)
rs.setBundledOutput("right", colors.cyan)
sleep(.1)
rs.setBundledOutput("right", colors.black)
sleep(.1)
rs.setBundledOutput("right", colors.cyan)
sleep(.1)
rs.setBundledOutput("right", colors.black)
sleep(.1)
rs.setBundledOutput("right", colors.cyan)
sleep(.05)
rs.setBundledOutput("right", colors.black)
sleep(.05)
rs.setBundledOutput("right", colors.cyan)
sleep(2)
shell.run("reboot")
else
print ("Fine, then fuck you...")
sleep(2)
end
shell.run("reboot")
I know that line 72 is
rs.setBundledOutput("right", colors.magenta)
but i cant figure out what is wrong with it. any help and maybe suggestions on how to make the coding easier would be appreciated