|
TarkenKalia Newbie
Joined: 25 Jan 2008 Posts: 7
|
Posted: Wed Jul 16, 2008 1:50 pm
Using %pos |
Ok what I'm trying to accomplish is a queue system. If for some reason, something needs to be taken out of the queue, i need to interact with 2 variables. One contains names, the other contains any of 3 different choices, so I need to find the position of a name in the first string. The issue is, when I use %pos, it counts the |'s used to separate values in a string. Is there a way I can avoid this so I can get the position number?
#var test {A|B|C|D|E|F|G}
#show %pos(F,@test)
yields 11...which it should be 6 |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Wed Jul 16, 2008 1:56 pm |
%pos is for strings
try %ismember for string lists
Code: |
#show %ismember(F,@test) |
that yields 6 |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
|
|
|
|
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
|
|