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
Ren
Beginner


Joined: 04 Apr 2003
Posts: 27

PostPosted: Fri May 30, 2003 9:52 am   

nesting string variables in a variable
 

@evil = troll|orc
@good = priest|priestess

@both = @evil|@good

Is this possible?

I tried this test trigger:

Pattern: You killed (%w)

#if (%1 ~= @both) {#show %1}

Unfortunately it shows me whatever %1 is, whether or not it is under @both

- Ren
Reply with quote
mrdark
Novice


Joined: 25 May 2003
Posts: 37

PostPosted: Fri May 30, 2003 10:27 am   
 
try this:

#if (%ismember(%1,@both)) {#show %1}
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Fri May 30, 2003 12:34 pm   
 
It's easier to do the check agaisnt the stringlist in the pattern:
#TRIGGER {You killed ({@both})} {#SHOW %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