/trashreport error..
#1

Well, I'm currently making a trash command for admins so they could trash the false reports. Anyway, this is the error:

: error 035: argument type mismatch (argument 2)


This is the code.
pawn Код:
CMD:trashreport(playerid, params[])
{
  new id, sendername[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
  if(!IsPlayerAdmin(playerid)) return 0;
  if(sscanf(params,"u", id)) return SCM(playerid, COLOR_AQUA,"Correct usage: {ffffff}/trashreport [Report ID]");
  if(!IsPlayerConnected(id)) return SCM(playerid, COLOR_RED,"Error: {ffffff}You have entered an invalid player id.");
  else
  {
     if(PlayerNeedsHelp[id] == 1)
     {
        PlayerNeedsHelp[id] = 0;
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(id, name, sizeof(name));
        format(string, sizeof(string), "[AdminCMD]: %s has just trashed the report of [ID:%d]%s.", sendername, id, name);
        SendClientMessage(COLOR_YELLOW, string, 1);
        format(string, sizeof(string), "**[ID:%d] %s has trashed your report, please make sure you report someone correctly next time.", playerid, sendername);
        SendClientMessage(playerid, 0x4D903DAA, string);
     }
     else return SCM(playerid, COLOR_GREY,"The player doesn't need any help!");
  }
  return 1;
}
Reply
#2

It gives me error of this line:

pawn Код:
SendClientMessage(COLOR_YELLOW, string, 1);
Reply
#3

Whats the error line?
@ Edit : SendClientMessage(playerid,COLOR_YELLOW, string);
Here u go
Reply
#4

hahaha :P lol odd of me that I did not notice that xD
Reply
#5

1. make sure you have at the begining of the script #define COLOR_YELLOW 0xFFFF00AA
2. make sure at the string you use "
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)