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


Joined: 22 Nov 2001
Posts: 48
Location: Italy

PostPosted: Tue Apr 09, 2002 6:35 pm   

match an item of a stringlist
 
how can I match an item of a string list
in a trigger?
ie:
my stringlist: PG1|PG2|PG3
I want to match lines with PG1 or PG2 or PG3
and I want to put the word matched in a var
tips?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Apr 09, 2002 7:09 pm   
 
#TR {({PG1|PG2|PG3})} {#VAR wordmatched %1}

LightBulb
All scripts untested unless otherwise noted
Reply with quote
zeiuszeppo
Novice


Joined: 22 Nov 2001
Posts: 48
Location: Italy

PostPosted: Tue Apr 09, 2002 7:11 pm   
 
hem...this is unuseful
my streinglist is contained in a var...
ie: @PGVAR
how can I match an item of @PGVAR ?
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Tue Apr 09, 2002 7:25 pm   
 
You can also use the variable in place of the actual stringlist and zMUD will expand it. Example:
#TRIGGER {({@PGVAR})} {#VAR wordmatched %1}

Kjata
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