Hello I have question.. About /reportbug.. - 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: Hello I have question.. About /reportbug.. (
/showthread.php?tid=411496)
Hello I have question.. About /reportbug.. -
TrueForYourSelf - 29.01.2013
Hello I'am new at samp and pawno language etc.
But maybe someone can help me out. I'am trying to get how it is working....
I hae thouse errors on command:
Код:
error 001: expected token: ",", but found "-string-"
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
And here is the command:
PHP код:
CMD:reportbug(playerid, params[])
{
new text[64], name[MAX_PLAYER_NAME], bugstring[256], Float:x, Float:y, Float:z, File:Bugs;
if(sscanf(params, "s[64]", text)) return SendClientMessage(playerid, COLOR_RED "• Incorrect fomat. Use /reportbug [description]"); //Error is giving this line!!!
if(strlen(text) > 64) return SendClientMessage(playerid, COLOR_RED,"• Description is too long (Max. 64 letters)");
GetPlayerName(playerid, name, sizeof(name));
GetPlayerPos(playerid, x, y, z);
format(bugstring, sizeof(bugstring), "%s reported a bug. Description : %s, on coordinates : X:%f, Y:%f, Z:%f\r\n", name, text, x, y, z);
Bugs = fopen("bugs.log", io_append);
fwrite(Bugs, bugstring);
fclose(Bugs);
SendClientMessage(playerid, COLOR_YELLOW, "• Thank you. You successfully reported a bug.");
return 1;
}
Re: Hello I have question.. About /reportbug.. -
[MG]Dimi - 29.01.2013
pawn Код:
if(sscanf(params, "s[64]", text)) return SendClientMessage(playerid, COLOR_RED, "• Incorrect fomat. Use /reportbug [description]"); //Error is giving this line!!!
Missing comma (,) after COLOR_RED
Re: Hello I have question.. About /reportbug.. -
TrueForYourSelf - 29.01.2013
All okay COLOR_RED,
Just was needed , after RED
Thank you for your help