Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Farek
Beginner


Joined: 13 Oct 2004
Posts: 29

PostPosted: 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
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: 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
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Farek
Beginner


Joined: 13 Oct 2004
Posts: 29

PostPosted: Tue Oct 30, 2007 3:49 am   
 
thx worked great :-)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net