SA-MP Forums Archive
Dialog crashing - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dialog crashing (/showthread.php?tid=260953)



Dialog crashing - Jay. - 11.06.2011

Hey , I have this dialog. I know it's the one , the one that crashes.

pawn Код:
if(listitem == 2)
            {
                new String[1024];
                format(String,sizeof(String),"%sBasejump1(/bsj1) SF Highlighter\nBasejump2(/bsj2) LS Skyscraper\n",String);
                format(String,sizeof(String),"%sBasejump3(/bsj3) Town Hall\nBasejump4(/bsj4)  Big Pointy Building\n",String);
                format(String,sizeof(String),"%sBasejump5(/bsj5) Bay Bridge\nBasejump6(/bsj6) The Visage\n",String);
                format(String,sizeof(String),"%sBasejump7(/bsj7) Emerald Isle\nBasejump8(/bsj8) SF Cliff\n",String);
                format(String,sizeof(String),"%sBasejump9(/bsj9) Golden Gate Bridge\nBasejump10(/bsj10) SF Crane\n",String);
                format(String,sizeof(String),"%sBasejump11(/bsj11) SF Crane 2\nBasejump12(/bsj12) LV Crane");
                ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Basejumps",String,"Select","Cancel");




            }
The problem is when I enter it , it shows the whole dialog empty, then the server crashes and me.
Know the problem ? I did have the charactors " - " I removed them , didn't work.

Thanks


Re: Dialog crashing - Sascha - 11.06.2011

look at your last string line:
pawn Код:
format(String,sizeof(String),"%sBasejump11(/bsj11) SF Crane 2\nBasejump12(/bsj12) LV Crane");
there is a ", String" missing at the end

and btw: the %s (string) at the first line is not really necessary.. the string is empty anyways at this time..


Re: Dialog crashing - Jay. - 11.06.2011

Quote:
Originally Posted by Sascha
Посмотреть сообщение
look at your last string line:
pawn Код:
format(String,sizeof(String),"%sBasejump11(/bsj11) SF Crane 2\nBasejump12(/bsj12) LV Crane");
there is a ", String" missing at the end
Oh , oh.. silly me, Thanks