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

[Error] bios:206: [string "mine"]:144: ')' expected

Started by JKF1209, 16 January 2013 - 07:29 PM
JKF1209 #1
Posted 16 January 2013 - 08:29 PM
I'm thinking that it's just a problem with my syntax.

bios:206: [string "mine"]:144: ')' expected

Here is the line in question (yes I am 100% sure this is the line)

if (xq-xs<50) and (orientation=3) then
xq=xq+1
Luanub #2
Posted 16 January 2013 - 08:43 PM
For comparisons you want to do == to assign a value you do = so it should be

if (xq-xs<50) and (orientation==3) then
ChunLing #3
Posted 17 January 2013 - 08:43 AM
Yes, but the problem may also stem from how the parentheses are being used in the (xq-xs<50) bit. I would remove all the parentheses from the line and just use spacing, like:
if xq-xs < 50 and orientation == 3 then
There are times when parentheses are necessary to properly establish (or merely clarify) operation precedence, but they aren't always necessary.