Command not working as intended
#4

Glad you asked. The person above your post left you over to the guess-what-you-did-wrong part.

CMD:makedonator requires two parameters. In your case: the targetid and the type of donator. You defined everything correctly till the sscanf function.
pawn Код:
(sscanf(params, "u", userid))
You 'told' sscanf that there is 1 parameter to look out for: targetid.
Since no 'type' parameter was defined in your sscanf function, it will ignore all the strcmp functions underneath returning 1 for the command after inserting the target's id.

We define the second parameter (the 'type' parameter) in the following code:
pawn Код:
(sscanf(params, "us[16]", userid, type))
And we define a size to the 's' specifier since 'type' is a string.
Reply


Messages In This Thread
Command not working as intended - by Luke_James - 22.02.2015, 17:33
Re: Command not working as intended - by Golf - 22.02.2015, 17:39
Re: Command not working as intended - by Luke_James - 22.02.2015, 18:17
Re: Command not working as intended - by AndySedeyn - 22.02.2015, 18:47
Re: Command not working as intended - by Luke_James - 22.02.2015, 20:08
Re: Command not working as intended - by AndySedeyn - 22.02.2015, 20:40
Re: Command not working as intended - by Luke_James - 22.02.2015, 21:08
Re: Command not working as intended - by AndySedeyn - 22.02.2015, 21:14
Re: Command not working as intended - by Luke_James - 22.02.2015, 21:24
Re: Command not working as intended - by AndySedeyn - 22.02.2015, 21:26

Forum Jump:


Users browsing this thread: 1 Guest(s)