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
Tala
Newbie


Joined: 15 May 2004
Posts: 2

PostPosted: Sat May 15, 2004 5:17 pm   

Returning information from a list
 
My situation is this: I have one variable(List1 for example) with a list of items that correspond to the value of certain keys in another variable(List2) with a data record. Is there a way to get zMUD to display the key for the correspoonding value?

@List1 contains abc||def
@List2 contains xyz=abc|uvw=def|123=ghi

I'd like it to display xyz and uvw
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sat May 15, 2004 7:22 pm   
 
#loopdb @list2 {#IF (%ismember(%val,@list1)) {%key}}

EDIT: Typo Fix
Reply with quote
Tala
Newbie


Joined: 15 May 2004
Posts: 2

PostPosted: Sat May 15, 2004 7:36 pm   
 
Would it be possible to display it in the status window?
ie:

%ansi( yellow, blue)Defenses: #LOOPDB @defense_map {#IF (%ismember( %val, @defenses)) {%key}}
Reply with quote
nexela
Wizard


Joined: 15 Jan 2002
Posts: 1644
Location: USA

PostPosted: Sun May 16, 2004 5:39 am   
 
Not like that

There might be another way to do it but I can't think of it off the top of my head.
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