Код:
CMD:szef(playerid, params[])
{
new SzefLista[512], SzefString[MAX_SZEF][64];
format(SzefLista, sizeof(SzefLista), "Szйf\tБllapot\n");
for(new i; i <MAX_SZEF; i ++)
{
if(SzefLP[i] == true) format(SzefString[i], sizeof(32), "Szйf %d\tNyitva\n", SzefLP[i]);
else if(SzefLP[i] == false) format(SzefString[i], sizeof(32), "Szйf %d\tZбrva\n", SzefLP[i]);
format(SzefLista, sizeof(SzefLista), "%s%s\t%d\n", SzefLista, SzefLP[i], SzefString[i]);
}
ShowPlayerDialog(playerid, DIALOG_SZEF_FELTOR, DIALOG_STYLE_TABLIST_HEADERS, "Szйf feltцrйs", SzefLista, "Kivбlaszt", "Mйgsem");
return 1;
}
Код:
TheInfinity.pwn(38558) : error 020: invalid symbol name ""
TheInfinity.pwn(38558) : error 029: invalid expression, assumed zero
TheInfinity.pwn(38558) : warning 215: expression has no effect
TheInfinity.pwn(38559) : error 029: invalid expression, assumed zero
TheInfinity.pwn(38559) : warning 215: expression has no effect
TheInfinity.pwn(38559) : error 001: expected token: ";", but found "if"
TheInfinity.pwn(38559) : error 020: invalid symbol name ""
TheInfinity.pwn(38559) : fatal error 107: too many error messages on one line
A little info: I have 10 safe and i want to check if they are open or closed one by one and list the information in a dialog, then in the dialog the player can choose a safe and open it or close it(depending on the current state). Is this method even good?