Two conditions in If statement

I am wanting to test two parameters in an If statement. What is the syntax for such?

if {parameter “pvExit” != “0”} or {parameter "lvExit != “0”}
exit 123
endif

Just do the test completely in relevance

if {parameter "pvExit" != "0" OR parameter "lvExit" != "0"}
3 Likes

As @AlanM points out, you can only have a single relevance substitution statement per if statement in actionscript.

This works as expected. I just failed to find it in documentation. Thanks a bunch!

The way this works is if the result is “True” then the if condition is taken.

So you can write actionscript that is

if True
    <commands>
endif
if False
    <commands that wont run>
endif

The result of the relevance expression in {} is converted to a string so it should be a True/False type answer but can be fairly complex but if it doesn’t result in True then the if won’t be taken. Always think of relevance substitution as a preprocessor type step in actionscript evaluation.

2 Likes