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
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Thu Jun 24, 2010 11:41 pm   

Reading one string list to another
 
Here is what I want to do. I have a stringlist with all my enemies (@EnemyList) on it. I have a stringlist with people I saw in my room (@PeopleHere). I want to compare @PeopleHere to @EnemyList and any names that match will be added to a third string list called @Targets. Is that doable?
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Fri Jun 25, 2010 1:14 am   
 
#forall @PeopleHere {#if (%ismember(%i,@EnemyList)) {#additem EnemyHere %i}}
_________________
EDIT: I didn't like my old signature
Reply with quote
Rolly
Wanderer


Joined: 16 Oct 2006
Posts: 62

PostPosted: Sat Jun 26, 2010 2:21 am   
 
Thanks it was easier than I thought it would be.
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