|
malikai3k Beginner
Joined: 24 Dec 2004 Posts: 14 Location: Brisbane, Australia
|
Posted: 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 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Feb 28, 2010 6:11 pm |
#forall @stringlist1 {
#if (%ismember(member,@stringlist2) {#delitem Stringlist2 member}
} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
malikai3k Beginner
Joined: 24 Dec 2004 Posts: 14 Location: Brisbane, Australia
|
Posted: 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}
} |
|
|
|
|
|