Error 017: Argument type mismatch (argument 2) -
bradleyofniet - 12.12.2014
Hey guys, I got a little problem, might wanna help me out here?
Error:
Код:
(44597) : error 035: argument type mismatch (argument 2)
Command:
Код:
CMD:am(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] != 0)
{
new toid, message[128];
if(!sscanf(params, "is[128]", toid, message)) return SendClientMessageEx(playerid, "[a]dmin[m]essage", "[playerid] [message]");
if(strlen(message) > 128) return SendClientMessageEx(playerid, "Your message cannot be longer than 128 characters.");
if(!IsPlayerConnected(toid)) return SendClientMessageEx(playerid, "That player is not connected!");
new string[128];
format(string, "Admin message from %s: %s", GetPlayerNameEx(playerid), message);
SendClientMessageEx(toid, COLOR_GREEN, string);
format(string, "Admin %s [%d] > %s [%d]: %s", GetPlayerNameEx(playerid), playerid, GetPlayerNameEx(toid), toid, message);
SendAdminMessage(COLOR_GREEN,string);
Log("logs/adminmessage.log", string);
PlayerInfo[playerid][pAMSSent] ++;
}
else
{
new message[80];
if(!sscanf(params, "s[80]", message)) return SendClientMessageEx(playerid, "[a]dmin[m]essage", "[message]");
if(strlen(message) > 80) return SendClientMessageEx(playerid, "Your message cannot be longer than 80 characters.");
//if(strfind(message, "Falling", true) != -1) return Error(playerid, "Type (/falling) and a administrative person will be there to assist you right away!");
new string[128];
format(string, "Admin message from %s [%d]: %s", GetPlayerNameEx(playerid), playerid, message);
SendAdminMessage(COLOR_GREEN,string);
format(string, "Your message, %s, has been sent.", message);
SendClientMessageEx(playerid, COLOR_GREEN, string);
format(string, "Player %s [%d] > Admins: %s", GetPlayerNameEx(playerid), playerid, message);
Log("logs/adminmessage.log", string);
}
return 1;
}
Error line 44597:
Код:
format(string, "Admin message from %s: %s", GetPlayerNameEx(playerid), message); // THIS LINE
SendClientMessageEx(toid, COLOR_GREEN, string);
Please help me out, I got multiple errors on this kind of lines, I don't know how to solve them :/
Bradley
Re: Error 017: Argument type mismatch (argument 2) -
bradleyofniet - 12.12.2014
And where do I paste in the color? Behind SendClientMessageEx(playerid, [color], "[message]"?
Re: Error 017: Argument type mismatch (argument 2) -
bradleyofniet - 12.12.2014
Edited, accidently posted the wrong line :/
Re: Error 017: Argument type mismatch (argument 2) -
HY - 12.12.2014
pawn Код:
format(string, sizeof(string), "Admin message from %s: %s", GetPlayerNameEx(playerid), message); // THIS LINE
SendClientMessageEx(toid, COLOR_GREEN, string);
Re: Error 017: Argument type mismatch (argument 2) -
bradleyofniet - 12.12.2014
Thanks!! Worked!