This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
rhinorulz's profile picture

[Lua][Error]

Started by rhinorulz, 14 March 2012 - 05:36 AM
rhinorulz #1
Posted 14 March 2012 - 06:36 AM
I'm making a movie theater and was wanting a program to turn on the house lights before/after the movie.

this is the code i am trying to use.
redstone.setOutput(front, true)

[error] Bad argument : String expected: Got nil.
[question] What am i doing wrong?
Advert #2
Posted 14 March 2012 - 06:39 AM
You need to put front in quotes.

In Lua, strings are surrounded by quotes "string", apostrophes 'string', or doublebrackets [[string]].
Variable names are never escaped, even if they contain strings.