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
Chris_3413
Novice


Joined: 22 Mar 2004
Posts: 46
Location: Australia

PostPosted: Wed Sep 28, 2005 6:37 am   

using %roomcol for coloring mapper rooms
 
I like to color code the rooms in my maps for imperian according to terrain type, so I created a series of triggers for each of the terrain types which look somthing like this:

#TRIGGER {Your environment conforms to that of Forest.} {currentcol=%roomcol( );#IF (@currentcol <> 32768) {%roomcol( ,32768)}}

(it checks the current room color before trying to change it)

Now while it actually works fine and changes the rooms color it also Sends the colors number value (in the above example it sends the number 32768) to the mud which then gets confused and spits back an error message.

Is there any way I can stop it sending these numbers?
_________________
What do you mean, Fatal Error!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Sep 28, 2005 8:28 am   
 
#NOOP
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Chris_3413
Novice


Joined: 22 Mar 2004
Posts: 46
Location: Australia

PostPosted: Fri Sep 30, 2005 6:33 am   
 
maybe i'm just totally missing somthing, but how is #noop going to solve this problem? .. maybe some sample output might clarify what i'm talking about:

H:269 M:222 E:1248 <eb> survey

You discern that you are standing in the Trabine Reserve.
Your environment conforms to that of Forest.
32768
You are in Prime Material Plane.
H:269 M:222 E:1248 <eb>
I am not sure I understand that.

when it triggers off the environment part of the survey results, it changes the maps room color like its supposed to but also sends that number to the mud resulting in the 'I am not sure I understand that.' message .. from what I can work out %roomcol shouldnt be sending anything to the mud which is what has me puzzled.


p.s. just as an experiment, i tried putting #noop before and after the %roomcol function and it didnt solve the problem
_________________
What do you mean, Fatal Error!
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Sep 30, 2005 8:39 am   
 
#TRIGGER {Your environment conforms to that of Forest.} {currentcol=%roomcol( );#IF (@currentcol != 32768) {#NOOP %roomcol( ,32768)}}

You still have to be in map mode or have your map unlocked in follow mode.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Chris_3413
Novice


Joined: 22 Mar 2004
Posts: 46
Location: Australia

PostPosted: Wed Oct 05, 2005 7:54 am   
 
Didnt work Sad

still sends 32768 to the mud

I also tried putting %roomcol( ,32768) on its own on the command line just to see for certain that its the culprit .. and it sent 32768 to the mud. Rolling Eyes
_________________
What do you mean, Fatal Error!
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Wed Oct 05, 2005 11:12 pm   
 
As a very simple breakdown.

%functions return and possibly execute something.
#Commands execute something and possibly return something.
#Noop does nothing. Sort of, its more in depth than that but it will expand and execute its paramates and absorb the return of a function

%roomcol(,32768) will change the roomcol to 32768 return 32768 to the screen
#Noop %roomcol(,32768) will change the roomcol to 32768 and the #noop will basicly eat the return value so you never see it on the screen.


Vijilantes trigger should work. Unless you are using the variable elsewhere I wouldnt use a variable, or even a #IF statement. Also like vijilante said it will only set the color if your are in Map mode, or if the mapper is unlocked via script.

#TRIGGER {Your environment conforms to that of Forest.} {#NOOP %roomcol( ,32768)}
_________________
Zmud Support Library
Zmud Knowledge Base
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