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
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Thu Jun 19, 2003 2:24 am   

Parsing variables
 
Hi, I need some help running a trigger that makes communication go to another window.
Teh curren trigger for one channel is
&player gossips, '&message'

{then its value is}
#ga
#win Comm {@player gossips, '@message'}
#BEEP
:Comm:#co 6

Now the trouble is when ppl go like
Someone gossips, 'Hi there ;)'
It apperars that having the symbol ";" within the variable makes the trigger abort itself
no i was wondering why, anyone have any thoughts?
Reply with quote
geniusclown
Magician


Joined: 23 Apr 2003
Posts: 358
Location: USA

PostPosted: Thu Jun 19, 2003 4:19 am   
 
It's the usage of creating a variable with &message. Unless you actually need the message to be a variable, use:
quote:
#TRIGGER {(*) gossips, '(*)'} {#GAG;#WIN Comm {%1 gossips, '%2'}}

If you do want the player and gossip to be variables, add them with seperate #VAR commands, using {} to keep the ;) from seperating:
quote:
#TRIGGER {(*) gossips, '(*)'} {#GAG;#WIN Comm {%1 gossips, '%2'};#VAR Player {%1};#VAR Gossip {%2}}

Actually, since you want the exact same thing to appear in the Comm sub-window, it would be easier to just do
quote:
#TRIGGER {* gossips, '*'} {#GAG;#CAPTURE Comm}

The #WIN allows you to reformat and/or change colors of parts:
quote:
#TRIGGER {(*) gossips, '(*)'} {#GAG;#WIN Comm {%1: %2};#PCOL green %x1;#PCOL gray %x2}
(note that #PCOL is special in that uses %x1, etc instead of just %1)
Reply with quote
DeReP
Adept


Joined: 14 Jun 2003
Posts: 222
Location: Chile

PostPosted: Thu Jun 19, 2003 3:04 pm   
 
Well, what can I say. Thanx a lot for taking the time, solved the problem right away in every way and made it perfectly clear.
Thanx again.
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