Error "argument type mismatch (argument 2)" -
OMonger - 25.01.2015
I keep getting this error, and am unsure on how to fix it. "C:\Users\Oli\Desktop\samp scripts\gangwars\gamemodes\gangwar.pwn(204) : error 035: argument type mismatch (argument 2)", the line that the error is coming from is this:
command(helpme, playerid, params[])
{
new help[255], string[128];
if(sscanf(params, "z", help))
{
SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /helpme [message]");
}
else
{
format(string, sizeof(string), "{FE2EC8}[HELP]: {FFFFFF}%s (%d){FE2EC8}: %s", playerid, help);
SendToStaff(COLOR_PINK, string);
SendClientMessage(playerid, YELLOW, "Your question was sent to the Staff team, await a reply.");
}
return 1;
}
Thanks.
Re: Error "argument type mismatch (argument 2)" -
zaibaslr2 - 25.01.2015
pawn Код:
if(sscanf(params, "s", help))
Re: Error "argument type mismatch (argument 2)" -
OMonger - 25.01.2015
The problem still persists after changing it to: "if(sscanf(params, "s", help))"
Re: Error "argument type mismatch (argument 2)" -
zaibaslr2 - 25.01.2015
Which line is error line?
Re: Error "argument type mismatch (argument 2)" -
OMonger - 25.01.2015
The error line remains on 204. Which is the first SendClientMessage line.
Re: Error "argument type mismatch (argument 2)" -
zaibaslr2 - 25.01.2015
Show me the line itself, not number of line.
Re: Error "argument type mismatch (argument 2)" -
OMonger - 25.01.2015
{
SendClientMessage(playerid, COLOR_WHITE, "SYNTAX: /helpme [message]");
}
That is the line it appears on.
Re: Error "argument type mismatch (argument 2)" -
zaibaslr2 - 25.01.2015
Have you defined #COLOR_WHITE?
By the way, -1 is also white, so you can use
pawn Код:
SendClientMessage(playerid,-1,"Message");
Re: Error "argument type mismatch (argument 2)" -
OMonger - 25.01.2015
Quote:
Originally Posted by zaibaslr2
Have you defined #COLOR_WHITE?
By the way, -1 is also white, so you can use
pawn Код:
SendClientMessage(playerid,-1,"Message");
|
I changed "COLOR_WHITE" to -1, thanks for the reference.
Re: Error "argument type mismatch (argument 2)" -
zaibaslr2 - 25.01.2015
Quote:
Originally Posted by OMonger
I changed "COLOR_WHITE" to -1, thanks for the reference.
|
Did it fix your problem?