 |
adamwalker Apprentice
Joined: 12 Mar 2005 Posts: 195
|
Posted: Wed Mar 15, 2006 2:38 pm
number of item in a list? |
question that i cant work out how to do...
i have a @variablelist
eg
@variablelist = red|blue|green|dog|monkey|bannana
and i have a variable called @pickme
what i want to do is IF @pickme %ismember @variablelist then delete it from the list.. and the item after it...
SO...
#if (%ismember( @pickme, @variablelist)) {#deli @pickme @variablelist;and delete the next item}
so if @pickme = dog. both dog and monkey get deleted.
thanks for your help guys! |
|
|
|
 |
JQuilici Adept
Joined: 21 Sep 2005 Posts: 250 Location: Austin, TX
|
Posted: Wed Mar 15, 2006 3:20 pm |
%ismember will give you the item number if the item is in the list. See the %ismember help page for details.
So...just capture the return value from %ismember. If it's nonzero, delete that item number twice. |
|
_________________ Come visit Mozart Mud...and tell an imm that Aerith sent you! |
|
|
 |
|
|
|