1619 posts
Posted 22 November 2012 - 09:22 AM
http://pastebin.com/mq0eg2VPThe error is:
bios:388: [string "startup"]:21: 'then' expected
Line 21 is:
if output = true then
1688 posts
Location
'MURICA
Posted 22 November 2012 - 09:29 AM
The equal sign should be a double equal sign. Single equal signs are only used for setting variables. In ifs, you need to use the double equal sign.
if output == true then
1619 posts
Posted 22 November 2012 - 09:34 AM
The equal sign should be a double equal sign. Single equal signs are only used for setting variables. In ifs, you need to use the double equal sign.
if output == true then
Oh of course, instead of Lua saying "= expected", it had to give me a magical quest for finding my bug.
2005 posts
Posted 22 November 2012 - 09:40 AM
Lua thinks that you wanted to assign output = true, which would be perfectly valid usage. It was just letting you know that you didn't create a valid if then structure.
You can get away with "if output then … end", and you probably should in a case like this if you normally have this kind of problem. The comparison operators should be reserved for when you actually need to do a comparison rather than check for whether something is already true.