|
wetahdid Beginner
Joined: 06 Dec 2001 Posts: 22
|
Posted: Sat Dec 22, 2001 11:18 am
#if statements |
i want a trigger to check to see if 2 flags are set before executing..
currently im stacking the if commands inside each other.....
i.e.
----
#if (@a) (#noop) (#if (@b) (#noop....ect..
-----
is there away to do this ?
---------------
#if (@a),(@b)
--------
so i use 1 #if too check to varables and keep my code simpler or no? |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Sat Dec 22, 2001 12:02 pm |
Yes there is a way: just use "AND" or "&"
The format for #IF is: #IF (statement to check) {IfTrue} {IfFalse}
In your case:
#IF (@a AND @b) {commands if both are true} {commands if both are false}
Acaila |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Sat Dec 22, 2001 12:48 pm |
Also, the second part of the if statement would be executed if one of them is false, not only when both are false.
Kjata |
|
|
|
|
|