SA-MP Forums Archive
What Wrong? [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: What Wrong? [Error] (/showthread.php?tid=569771)



What Wrong? [Error] - KingPersona - 02.04.2015

hello

i have make this command

and i get error
Код:
error 017: undefined symbol "format_string"
, i define it already..
this what i define
pawn Код:
#define SCMF(%0,%1,%2,%3)           format(format_string, sizeof(format_string),%2,%3) && SCM(%0, %1, format_string)
errors in this line
Код:
   	SCMF(playerid, COLOR_RED, "Вы аннулировали все выговоры %s",playerVariables[params[0]][pNormalName]);
   	SCMF(params[0], COLOR_RED, "%s аннулировал вам все выговоры.",playerVariables[playerid][pNormalName]);
SCMF
pawn Код:
CMD:unstai(playerid, params[])
{
    if(playerVariables[playerid][pAdminLevel] < 7) return true;
    if(sscanf(params, "d",params[0])) return SCM(playerid, COLOR_WHITE, "Syntax: /unstai [id]");
    if(strcmp(playerVariables[playerid][pNormalName], "TEST", false) && strcmp(playerVariables[playerid][pNormalName], "TEST", false) && strcmp(playerVariables[playerid][pNormalName], "Samuel_Lecompte", false) && strcmp(playerVariables[playerid][pNormalName], "Bandy_Rasti", false)) return true;
    if(playerVariables[params[0]][pAdminLevel] == 0) return true;
    playerVariables[params[0]][pAvig] = 0;
    SCMF(playerid, COLOR_RED, "Вы аннулировали все выговоры %s",playerVariables[params[0]][pNormalName]);
    SCMF(params[0], COLOR_RED, "%s аннулировал вам все выговоры.",playerVariables[playerid][pNormalName]);
    return true;
}



Re: What Wrong? [Error] - RoboN1X - 02.04.2015

Define string "format_string" globally
Код:
new format_string[128];



Re: What Wrong? [Error] - KingPersona - 02.04.2015

Thanks, +Rep.