')' expected in line 121


I keep getting the ‘)’ expected in line 121 error and I am not sure why? The debug menu is putting “< >” around " … + 1 < y >" at the end of my code but I’m not sure if that means anything. Not sure why it is giving me this error when I have the correct parenthesis.

1y is a variable I have set earlier in the code.

Line 121 of my code:
makeRectangle(width-width/3 ,height-2*height/3 ,width/3+1x ,height/3+1y );

Thank you!

1 Like

Most programming languages don’t allow variable names starting with digits.
I guess this is also true for Fiji macro language. Most likely the parser is confused by 1y, 1x.
Try calling these y1,x1

1 Like

Hello Richard -

Indeed, as Volker said, “1x” is not a valid variable name. But,
for whatever reason, the 'statement" 1x = 10 is legal IJM code.
(It appears to me to parse as “1” and then as the statement
x = 10.)

You can see (more or less) what is going on by running the
following IJM script:

1x = 10
2y = 100
print (x)
print (y)
z = 1x + 1000
print (z)
u = 10000 + 2y
print (u)
print (1x)

You will get an error (analogous to the one your reported) on
the last line. But up until then the code is “correct” (but probably
doesn’t do what one would expect).

As Volker said, not using leading digits for your variable names
should fix your problem.

Thanks, mm

1 Like