|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: 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") |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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} |
|
|
|
Guinn Wizard
Joined: 03 Mar 2001 Posts: 1127 Location: London
|
Posted: 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... ;) |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon Mar 31, 2008 1:59 pm |
Thanks
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
|
|