SA-MP Forums Archive
Help : Argument type Mismatch (argument 1) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help : Argument type Mismatch (argument 1) (/showthread.php?tid=481335)



Help : Argument type Mismatch (argument 1) - faiznurfaza - 15.12.2013

Код:
if(sscanf(params, "ud", target, level)) return SCM(playerid, Yellow, "[Usage] : /makeadmin [playerid] [level 0 - 5]");
What's Wrong?

Help me, thanks.


Re: Help : Argument type Mismatch (argument 1) - Hybris - 15.12.2013

It should work now
Код:
if(sscanf(params, "ud", target, level)) return SCM(playerid, 0xF3FF02, "[Usage] : /makeadmin [playerid] [level 0 - 5]");



Re: Help : Argument type Mismatch (argument 1) - faiznurfaza - 15.12.2013

Same Error :/


Re: Help : Argument type Mismatch (argument 1) - Hybris - 15.12.2013

Do you have any colors defined?
#define YELLOW "{F3FF02}"


Re: Help : Argument type Mismatch (argument 1) - faiznurfaza - 15.12.2013

Yes

Код:
#define Red 0xFF3E3EFF
#define Green 0x00FF00FF
#define Yellow 0xFFFF00FF
#define LightBlue 0x00FFFFFF
#define Orange 0xFF8000FF
#define Purple 0x8000FFFF
#define Blue 0x0080FFFF



Re: Help : Argument type Mismatch (argument 1) - CrossUSAAF - 15.12.2013

Please check you your "SCM" definition/Macro, in top of the script.

You can also try "SendClientMessage();" instead of "SCM".

Thank you.


Re: Help : Argument type Mismatch (argument 1) - faiznurfaza - 15.12.2013

same error

my SCM define :
pawn Код:
#define SCM SendClientMessage



Re: Help : Argument type Mismatch (argument 1) - Hybris - 15.12.2013

Should work now
Код:
if(sscanf(params, "ud", target, level)) return SCM(playerid, 0xFFFF00FF, "[Usage] : /makeadmin [playerid] [level 0 - 5]");



Re: Help : Argument type Mismatch (argument 1) - Loot - 15.12.2013

We need to see how did you defined both 'target' and 'level' in order to help you.


Re: Help : Argument type Mismatch (argument 1) - CrossUSAAF - 15.12.2013

Okay, so problem isn't in your SCM definition. What is the command processor you use at the moment? If passing params "u" and "d" in sscanf, those variables has to be integers.