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
geosmith
Wanderer


Joined: 23 Apr 2005
Posts: 57

PostPosted: Mon Aug 01, 2005 9:34 am   

#IF Question
 
Been making quite extensive use of #IF, with true and false responses along the lines of...

#IF (@variable=1) {do this} {else do this}

Pretty simple stuff, but embedding a chain of those usually achieves the desired result.

However, is it possible to use #IF to check the state of -two- variables and only return a "true" result if both equal the specified value?

Presumably it would be something along the lines of...

#if (@variable1=1) and (@variable2=1) {do this} {else do this}

... but how would I actually write the "and" bit in the middle?

Any advice would be appreciated.
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Mon Aug 01, 2005 11:18 am   
 
Nearly there...

#if (@variable1=1 AND @variable2=1) {do this} {else do this}
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