PDA

View Full Version : formatting problem


penaut
11/07/2017, 12:09 PM
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

penaut
11/07/2017, 12:13 PM
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?