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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Sep 25, 2010 4:34 pm   

[3.29b] General color question
 
In my scripts I update all the pertinent room information using GMCP. I'd also like to test the color and set the color correctly if it is incorrect. To do this I need to be able to test whether what the current color is.

However I get a mismatch between what is returned by %colorname and what is returned by %roomcol.

// Set the room to lightsalmon color
#call %roomcol(,lightsalmon)

// Get the room color
#say %roomcol
8036607

// Get the lightsalmon %colorname value
#say %colorname(,lightsalmon)
536870911

How do I do this correctly?
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: Sat Sep 25, 2010 6:27 pm   
 
The reason for that is because you are putting a comma in the function call. If you just call it directly you will get the correct result.

Code:
#say %colorname(lightsalmon)
_________________
Asati di tempari!
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Sep 25, 2010 6:30 pm   
 
Heh, I've gotten so much in the habit of putting the comma in when working with room properties I didn't even notice I put it in there by accident.

Thanks!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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