Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
malikai3k
Beginner


Joined: 24 Dec 2004
Posts: 14
Location: Brisbane, Australia

PostPosted: Sun Feb 28, 2010 7:48 am   

array help
 
ok so here's something i've been trying to do with a script and for the life of me I can't get it to work. I'm pretty sure it's possible I'm just not seeing it.

All I'm trying to to is;

I have 2 arrays say array1 and array2. check array2 for any values in array1 and then delete them from array2.

help is much appriciated.

Thanks folks
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Feb 28, 2010 6:11 pm   
 
#forall @stringlist1 {
#if (%ismember(member,@stringlist2) {#delitem Stringlist2 member}
}
_________________
EDIT: I didn't like my old signature
Reply with quote
malikai3k
Beginner


Joined: 24 Dec 2004
Posts: 14
Location: Brisbane, Australia

PostPosted: Mon Mar 01, 2010 8:51 am   
 
thanks man that was pretty much it, just had to add in a ) and swap member to %i

#forall @stringlist1 {
#if (%ismember(%i,@stringlist2)) {#delitem Stringlist2 %i}
}
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD 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