error 035: argument type mismatch (argument 2)
#1

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;
}
Reply
#2

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, "...");
Reply
#3

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.
Reply
#4

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:");
?
Reply
#5

i get it :P And i forgot to change that :P

Thanks for your help, Rep+
Reply
#6

By the way, you can do this instead
pawn Код:
string = "Your stats:";
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)