Hello I have question.. About /reportbug..
#1

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

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
Reply
#3

All okay COLOR_RED,
Just was needed , after RED
Thank you for your help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)