Im just messing around wondering how would i get the postion of a string without tokenizeing the string... i've tried lindexof , indexof and triming the string and getting the var of each ... but none work, indexof was the closest thing to it but it gave the positon of the first letter in the entire string so say if i had
this.parts = one,two,three
indexof would give me 1,4,7
if it helps this is what i put when i trimed the string
NPC Code:
if(actionserverside)
sendtonc Debug:#p(0);
//#CLIENTSIDE
if(created){
setstring this.parts,skin,coat,sleeves,shoes,belt;
}
if(playerchats){
tokenize #c;
if(strcontains(#s(this.parts),#t(0))){
triggeraction 0,0,serverside,Player/Taylor,#e(indexof(#t(0),#s(this.parts)),strlen(#t( 0)),#s(this.parts))
,;
}
}
that gets me the string but i want the position of the string in the list
and this is with indexof
NPC Code:
if(actionserverside)
sendtonc Debug:#p(0);
//#CLIENTSIDE
if(created){
setstring this.parts,skin,coat,sleeves,shoes,belt;
}
if(playerchats){
tokenize #c;
if(strcontains(#s(this.parts),#t(0))){
triggeraction 0,0,serverside,Player/Taylor,#v(indexof(#t(0),#s(this.parts)))
,;
}
}