/trashreport error.. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /trashreport error.. (
/showthread.php?tid=374068)
/trashreport error.. -
MrBorsh - 01.09.2012
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;
}
Re: /trashreport error.. -
MrBorsh - 01.09.2012
It gives me error of this line:
pawn Код:
SendClientMessage(COLOR_YELLOW, string, 1);
Re: /trashreport error.. -
Admigo - 01.09.2012
Whats the error line?
@ Edit : SendClientMessage(playerid,COLOR_YELLOW, string);
Here u go
Re: /trashreport error.. -
MrBorsh - 01.09.2012
hahaha :P lol odd of me that I did not notice that xD
Re: /trashreport error.. -
[FR]Fratzica - 01.09.2012
1. make sure you have at the begining of the script #define COLOR_YELLOW 0xFFFF00AA
2. make sure at the string you use "