• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Multiple conditionals?

EightBitz

Well-known member
Is there a syntax that allows multiple conditionals for an if or a validif? I want to do something like this:
Code:
validif ((field[trtUser].value <> 3) and (field[trtUser].value <> 5))

or this:

Code:
if ((field[trtUser].value <> 3) and (field[trtUser].value <> 5)) then
   @valid = 0
    endif

I ended up using this:

Code:
if (field[trtUser].value = 3) then
   @valid = 0
elseif (field[trtUser].value = 5) then
   @valid = 0
else
   @valid = 1
    endif

And that works, but I'm still curious if it's possible to use multiple conditionals in a single if statement.
 
No, you can't combine them like you wanted to (unless you can write things as a tagexpr[] inside a single if () then, since a tagexpr can handle more complex logic).
 
Back
Top