18.07.2011, 02:05
Most (Or maybe all) people use sscanf like this method:
But I feel like something confusing my mind. "params[]". I know it's the string after the command (right?) (f.e /command (params)).
I have some question regarding this:
1- What happen if I put number/size in params? (f.e params[128])
2- What if I do this (if(!sscanf(params,"s ",params)? Is it possible(I guess yes)? What is the advantage and disadvantage?
3- Is this method (if(!strcmp(string,"qwe"))) is faster than sscanf? Why? And how to convert this to sscanf?
pawn Code:
CMD:a(playerid,params[])
{
new string[128];
if(!sscanf(params,"s ",string)
.............
I have some question regarding this:
1- What happen if I put number/size in params? (f.e params[128])
2- What if I do this (if(!sscanf(params,"s ",params)? Is it possible(I guess yes)? What is the advantage and disadvantage?
3- Is this method (if(!strcmp(string,"qwe"))) is faster than sscanf? Why? And how to convert this to sscanf?