|
Farek Beginner
Joined: 13 Oct 2004 Posts: 29
|
Posted: Mon Oct 29, 2007 12:05 pm
need help with a trigger. |
Need help with a trigger that looks like this:
#if (something1) is true (action1) else check this one (something2) if true (action2) if both are false do this one (action3)
have no idea how to make a trigger that check this and do as above.
hope its explained properly otherwise ill try to write it better :-)
have a good one |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Mon Oct 29, 2007 12:52 pm |
The best anyone can tell you without more information is this. It is commonly called an if-else chain.
#IF (expression) {action1} {#IF (expression) {action2} {action3}} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Mon Oct 29, 2007 2:15 pm |
CMUD provides a much nicer way to do this in the #switch command. It's especially useful when you have a long chain of elseifs or a large number of possible values for a single variable.
|
|
|
|
Farek Beginner
Joined: 13 Oct 2004 Posts: 29
|
Posted: Tue Oct 30, 2007 3:49 am |
thx worked great :-)
|
|
|
|
|
|