SA-MP Forums Archive
/Report - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /Report (/showthread.php?tid=99137)



/Report - Lia - 26.09.2009

I went to my /report command and edit it..
but.. this error: error 076: syntax error in the expression, or invalid function call

code:
Quote:

if(strcmp(cmd, "/report", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /report [id][reason]");
return 1;
}
format(string, sizeof(string), "%s has reported player %s(%d) Reason: %s", sendername,GetPlayerName, playerid, (result));
ABroadCast(COLOR_GREEN,string,1);
SendClientMessage(playerid, COLOR_YELLOW, "Your Report Message was sent to the Admins.");
}
return 1;
}

please help,

~Lia