ShowPlayerDialog crash
#10

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.

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");
About the crashing, put a bunch of print statements in to see which line is crashing it.
Reply


Messages In This Thread
ShowPlayerDialog crash - by Dreftas - 26.10.2009, 00:36
Re: ShowPlayerDialog crash - by Joe Staff - 26.10.2009, 00:38
Re: ShowPlayerDialog crash - by Dreftas - 26.10.2009, 00:41
Re: ShowPlayerDialog crash - by Joe Staff - 26.10.2009, 00:53
Re: ShowPlayerDialog crash - by Dreftas - 26.10.2009, 00:57
Re: ShowPlayerDialog crash - by Dreftas - 26.10.2009, 01:04
Re: ShowPlayerDialog crash - by Dreftas - 26.10.2009, 01:17
Re: ShowPlayerDialog crash - by Dreftas - 26.10.2009, 01:25
Re: ShowPlayerDialog crash - by Danny_Costelo - 26.10.2009, 03:05
Re: ShowPlayerDialog crash - by Dabombber - 26.10.2009, 05:51

Forum Jump:


Users browsing this thread: 4 Guest(s)