Is it possible to check for a position in a list?
Like a list of people Jim, Joe, Jake.
Is there a way to find that Joe is in position 2?
ID:269543
![]() Jul 28 2005, 1:47 pm
|
|
![]() Jul 28 2005, 1:50 pm
|
|
list.Find(item) will return the position of item in the list or 0 if it's not in there.
|
_> Actually, if I use list.Find(Joe) it will just do that, I am looking for it to output like "2", etc. |
if(list[2]=="Joe")return 1 Something like that should work. =p |
I dunno if this is the most efficient way, but it should work(untested):
mob/verb/locatepos() EDIT Bah, their ways look better. But I tried. =P |