|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: 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? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: 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! |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: 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! |
|
|
|
|
|