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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon Mar 31, 2008 1:05 pm   

Another #IF Expression Question
 
am I able to use other operants such as && and ||?

So... make something like..

#IF (@posn="wake") && (@status="noidle")
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 31, 2008 1:15 pm   
 
Yep, just stick the sub-expressions inside an expression:

#if (@haddock="cheese" AND @sips_left>=503 AND (@Fortune500="high" OR @FTSE>6000) AND @DoABrianBlessedImpression) {#say "Diiiiiiiiiiiiive!"} {#add sips_left -1}
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Mar 31, 2008 1:58 pm   
 
I thought we should be using && or || now, rather than AND/OR?
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
chamenas
Wizard


Joined: 26 Mar 2008
Posts: 1547

PostPosted: Mon Mar 31, 2008 1:59 pm   
 
Thanks
_________________
Listen to my Guitar - If you like it, listen to more
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Mar 31, 2008 2:02 pm   
 
You should be using && and || instead of & and |, which worked in zMUD. & looks like database syntax and | looks like a stringlist, so they're not supported. AND and OR work fine. See also.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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