Posts: 253
Threads: 17
Joined: Jan 2014
Reputation:
0
Sscanf is your friend you know ?
new reason[64], targetid, days;
if(!sscanf(params,"uds",targetid,days,reason))
And you got the player, time, reason in one line!
Posts: 253
Threads: 17
Joined: Jan 2014
Reputation:
0
"uds[64]" is required when params size is defined I think.
I've tried "uds" and it works fine for me
but in Commands processors its this way : Cmd:command(playerid, params[])
Posts: 1,830
Threads: 49
Joined: Nov 2014
Reputation:
0
When not defining a size for a sscanf string, i get printed an error for not doing so in the server console.
But i haven't used strcmp to use commands, so that might be different.
Posts: 1,830
Threads: 49
Joined: Nov 2014
Reputation:
0
Try using sscanf as we explained, it automatically detects if you don't write anything, aswell as assigning the parameters.
Posts: 253
Threads: 17
Joined: Jan 2014
Reputation:
0
You fix it by downloading Sscanf and using it.