26.10.2009, 05:51
There's nothing wrong with using format to append stuff to a string, in fact it's probably better than using strins since you won't have to worry about buffer overflows. You might want to do it differently so you don't get the trailing newline though.
About the crashing, put a bunch of print statements in to see which line is crashing it.
pawn Код:
format(ShowDlg, sizeof(ShowDlg), "%s - %d$", HouseCarName[0], HouseCarPrice[0]);
for(new k = 1; k < MAX_CARS; k++) {
format(ShowDlg, sizeof(ShowDlg), "%s\n%s - %d$", ShowDlg, HouseCarName[k], HouseCarPrice[k]);
}
ShowPlayerDialog(playerid, id, DIALOG_STYLE_LIST, "House Car", ShowDlg, "Buy", "Cancel");