Tempban command is not working properly.
#1

Fixed!
Reply
#2

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!
Reply
#3

String size of 300? And using strtok?
I don't think you need a size of 300, and as Golimad told, you should also try using newer metods, like sscanf.
Although @Golimad, sscanf requires a string size.
Quote:

"uds[64]"

Reply
#4

"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[])
Reply
#5

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.
Reply
#6

Quote:
Originally Posted by CalvinC
Посмотреть сообщение
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.
you are right, Just use s[size] its in the sscanf wiki.
Reply
#7

Fixed!
Reply
#8

Try using sscanf as we explained, it automatically detects if you don't write anything, aswell as assigning the parameters.
Reply
#9

You fix it by downloading Sscanf and using it.
Reply
#10

Fixed!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)