How do I combine multiple variables (more than two) in the scripted expression using the IF function? Compare the two images below (first works, but second one throws an error and does not seem to compute)
In the screenshot that is failing you need to rename your variable to match the if statement, or you need to rename your reference used inside of the statement to match your variable name.
As a good practice put the multiple AND portion of the statement in parenthesis like so:
Without Renaming your variable:
0 if (var > -0.5 and var < 0.5 and var_001 > -0.5 and var_001 < 1) else 2
With renaming the variable:
0 if (var > -0.5 and var < 0.5 and var2 > -0.5 and var2 < 1) else 2