 |
Zillat Newbie
Joined: 31 May 2008 Posts: 8
|
Posted: Sun Jun 01, 2008 3:22 pm
You can easily help me, i'm sure of it! Just need a command. |
This is an easy problem, i'm just looking for a command.
I have a list, and i want to check if an item is on the list. If i isn't, i'll perform some tasks relating to the item then add it to the list.
It's a list of "items i've done stuff too" baiscly.
Please help! Thank you. |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Sun Jun 01, 2008 5:03 pm |
%ismember as in #if %ismember(%1,@ListOfStuff) {do something if it is} {do something if it isn't}
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Jun 01, 2008 5:05 pm |
Nope, there's no command. There's a function, though, called %ismember(). This will return the number of the first item that matches, or 0 if it doesn't exist in the stringlist.
To use it like you want, you'll probably want the #IF command:
#IF (%ismember(item to look for, "stringlist to look in")) {stuff to do if on the list} {stuff to do if not on the list} |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|