SA-MP Forums Archive
Crash from dialog - 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: Crash from dialog (/showthread.php?tid=204496)



Crash from dialog - regdude - 29.12.2010

Hi!
Anyone else noticed that pressing Cancel on INPUT_DIALOG causes server to crash?


Re: Crash from dialog - xxmitsu - 29.12.2010

No.

Check your code in
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
...
        if(dialogid == 12345) // id of your showplayerdialog
        {
                  ....
                   if(response == 0) // response is 0 when option 2 is pressed. Assuming that cancel is your 'option two'
..
...



Re: Crash from dialog - bigcomfycouch - 29.12.2010

It was happening to me as well.

edit:
Yes, it causes a segmentation fault when I press the secondary button on an input dialog.


Quote:

sh-3.2# samp03svr[7300]: segfault at 0000000000000000 rip 00000000f7cea308 rsp 00000000ffc257f0 error 4




Re: Crash from dialog - DVDK - 29.12.2010

Quote:
Originally Posted by bigcomfycouch
Посмотреть сообщение
It was happening to me as well.

edit:
Yes, it causes a segmentation fault when I press the secondary button on an input dialog.
Show the script, we're not mind readers.


Re: Crash from dialog - regdude - 29.12.2010

Quote:

ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Input text!","Text:","Go","Cancel");


if(dialogid == 1) {
if(response == 1) {
format(...
} else {
//...
}
return true;
}

Something like this.


Re: Crash from dialog - Mr.Jvxmc - 29.12.2010

i add colors on dialogs, and some time like pawn loading a 5. years what is problem ?