Just answer me a thing about STRTOK:
#3

Well using your example, this is how:

pawn Код:
if(strcmp("/kick",cmdtext,true,10) == 0)
{
    new tmp[256],tmp2[256],idx; tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext,idx);
    new id = strval(tmp);
    Kick(id);
    return 1;
}
Although I don't know why your strings are so long!

Anyway I recommend using sscanf as opposed to strtok, much cleaner, easier and has a lot more functionality.
Reply


Messages In This Thread
Just answer me a thing about STRTOK: - by blackwave - 21.12.2010, 12:49
Re: Just answer me a thing about STRTOK: - by MadeMan - 21.12.2010, 12:51
Re: Just answer me a thing about STRTOK: - by JaTochNietDan - 21.12.2010, 12:51
Re: Just answer me a thing about STRTOK: - by blackwave - 21.12.2010, 12:58
Re: Just answer me a thing about STRTOK: - by JaTochNietDan - 21.12.2010, 13:01
Re: Just answer me a thing about STRTOK: - by Rachael - 21.12.2010, 13:04
Re: Just answer me a thing about STRTOK: - by blackwave - 21.12.2010, 13:09

Forum Jump:


Users browsing this thread: 3 Guest(s)