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
ronfar_74@hotmail.com
Beginner


Joined: 30 Aug 2006
Posts: 10

PostPosted: Fri Apr 17, 2015 2:27 pm   

Variable equallity
 
Hello, could anyone tell me if its possible to make this work with part of a variable string?

#IF (%gmcp.room.info.flags = "safe") {$color="White"}

The problem is sometimes %gmcp,room.info.flags returns something along the lines of.... safe, indoors, no-npcs making the above not be true.
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Fri Apr 17, 2015 9:33 pm   
 
Use the %pos function:

Code:
#IF (%pos("safe", %gmcp.room.info.flags)) ....
Reply with quote
ronfar_74@hotmail.com
Beginner


Joined: 30 Aug 2006
Posts: 10

PostPosted: Sat Apr 18, 2015 2:17 pm   
 
thanks! got it working.
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