Why was IsValidHandle depreciated?
What should we use now? (Totally ruined about all my plugins)
And can someone make this work again?
Code:
stock StrToken(const String:inputstr[],tokennum,String:outputstr[],maxlen)
{
decl String:buf;
new cur_idx;
new idx;
new curind;
idx=BreakString(inputstr,buf,maxlen);
if(tokennum==1)
{
strcopy(outputstr,maxlen,buf);
return;
}
curind=1;
while (idx!=-1)
{
cur_idx+=idx;
idx=BreakString(inputstr[cur_idx],buf,maxlen);
curind++;
if(tokennum==curind)
{
strcopy(outputstr,maxlen,buf);
break;
}
}
}
I was using StrBreak, but it was depreciated and said to use BreakString, but now I'm getting compiler errors saying that arg 2 of the breakstring line has a datatype mismatch.
I dont understand. arg 2 is 'buf' and 'buf' is declared about 3-4 lines above as a string, which is the same type in the native.
Btw, this is an old stock and has seen many updates, so it might not be optimized as much as it could be.
__________________