error 035: argument type mismatch (argument 2) -
ThaCrypte - 02.08.2013
Well, i've started a new script from scratch, but there's a problem:
I'm keep getting some weird error's in the strings, and i can't see anything wrong.
Never had the error before.
CMD:
pawn Код:
CMD:credits(playerid, params[])
{
new string[128];
format(string,sizeof(string), "Credits:");
SendClientMessage(playerid, COLOR_LGREEN, string);
format(string,sizeof(string), "Server founder: ThaCrypte");
SendClientMessage(playerid, COLOR_WHITE, string); //error on this line
format(string,sizeof(string), "Server owner: ThaCrypte");
SendClientMessage(playerid, COLOR_WHITE, string); //error on this line
format(string,sizeof(string), "Server scripter: ThaCrypte");
SendClientMessage(playerid, COLOR_WHITE, string); //error on this line
format(string,sizeof(string), "...");
SendClientMessage(playerid, COLOR_WHITE, string); //error on this line
return 1;
}
AW: error 035: argument type mismatch (argument 2) -
BigETI - 02.08.2013
Please show us the definition of COLOR_WHITE.
And you don't have to format a string to pass a string into SendClientMessage.
pawn Код:
SendClientMessage(playerid, COLOR_LGREEN, "Credits:");
SendClientMessage(playerid, -1, "Server founder: ThaCrypte");
SendClientMessage(playerid, -1, "Server owner: ThaCrypte");
SendClientMessage(playerid, -1, "Server scripter: ThaCrypte");
SendClientMessage(playerid, -1, "...");
Re: error 035: argument type mismatch (argument 2) -
ThaCrypte - 02.08.2013
pawn Код:
#define COLOR_WHITE "{FFFFFF}"
And yeah, i know, but i need to for my showstats stock:
pawn Код:
{
new string[128];
format(string, sizeof(string), "Your stats:");
SendClientMessage(playerid, COLOR_LGREEN, string);
format(string, sizeof(string), "Score: [%d]- Rank: [%s] - Cash: [%d] - Kills: [%d] - Deaths: [%d]", PlayerInfo[playerb][pScores], RNS(playerid), PlayerInfo[playerb][pCash], PlayerInfo[playerb][pKills], PlayerInfo[playerb][pDeaths]);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
Which also gives me a error on the second line.
AW: error 035: argument type mismatch (argument 2) -
BigETI - 02.08.2013
Please replace
pawn Код:
#define COLOR_WHITE "{FFFFFF}"
with
pawn Код:
#define COLOR_WHITE 0xFFFFFFFF
Edit:
Why?
pawn Код:
format(string, sizeof(string), "Your stats:");
SendClientMessage(playerid, COLOR_LGREEN, string);
why not
pawn Код:
SendClientMessage(playerid, COLOR_LGREEN, "Your stats:");
?
Re: error 035: argument type mismatch (argument 2) -
ThaCrypte - 02.08.2013
i get it :P And i forgot to change that :P
Thanks for your help, Rep+
Re: error 035: argument type mismatch (argument 2) -
RedFusion - 02.08.2013
By the way, you can do this instead