Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 05.12.2016
As in the title. When i use y_dialog with y_inline (even if y_dialog included and not really used) it makes the responses from showplayerdialog unusable (so- a login GUI will show ittself, but after typing password it will just hang). Is there any fix?
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 06.12.2016
Is it ok to refresh my thread? Seems like it got burried and the issue still persist.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
Misiur - 06.12.2016
I think
https://github.com/Misiur/YSI-Includes/issues/45 might be related. If you're not using crashdetect do it and check if something pops up in the console.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 06.12.2016
Quote:
Originally Posted by Misiur
|
It seems fixed now for login (respond works), but with all commands with normal GUI im being given this in CrashDetect (the command, obviously, doenst work)
Код:
[debug] #0 0004f294 in Dialog_TryObtainID (... <1 argument>) at F:\samp\Pawno\include\YSI\YSI\..\YSI_Visual\y_dialog.inc:137
[debug] #1 00050328 in _ShowPlayerDialog (playerid=0, dialog=5000, style=2, title[]=@035dd810 "Wybierz zajmuj", caption[]=@035dd8a4 "Linia 55", button1[]=@035dda08 "SELECT", button2[]=@035dda28 "WYJD") at F:\samp\Pawno\include\YSI\YSI\..\YSI_Visual\y_dialog.inc:365
[debug] #2 000c6d14 in ShowPlayerDialogEx (playerid=0, dialogid=5000, style=2, caption[]=@035dd810 "Wybierz zajmuj", info[]=@035dd8a4 "Linia 55", button1[]=@035dda08 "SELECT", button2[]=@035dda28 "WYJD") at F:\samp\server\gamemodes\modules/fnc.pwn:7345
[debug] #3 0048b914 in public cmd_bus (playerid=0, ... <1 argument>) at F:\samp\server\gamemodes\modules/cmd.pwn:12872
[debug] #4 native CallLocalFunction () from samp-server.exe
[debug] #5 00016420 in public FIXES_OnPlayerCommandText (... <2 arguments>) at F:\samp\Pawno\include\zcmd.inc:102
[debug] #6 00003be4 in public OnPlayerCommandText (playerid=0, cmdtext[]=@04778d88 "/bus") at F:\samp\Pawno\include\fixes.inc:3558
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
Konstantinos - 06.12.2016
Looking at the code, the size of
YSI_g_sDialogPlayers and
YSI_g_sDialogMasters arrays is 2000 and you used 5000 as a
dialogid. Keep it below that limit instead of increasing
MAX_DIALOGS and it will fix the run time error.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 06.12.2016
Quote:
Originally Posted by Konstantinos
Looking at the code, the size of YSI_g_sDialogPlayers and YSI_g_sDialogMasters arrays is 2000 and you used 5000 as a dialogid. Keep it below that limit instead of increasing MAX_DIALOGS and it will fix the run time error.
|
Is it safe to make this bigger? I'd have to change a lot of things since i have 100 dialogids reserved for a set of things like
car dealer 100-200
car tuning 200-300
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
Konstantinos - 06.12.2016
I don't see why it wouldn't be. Just try to use a size that is not exaggeration.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 06.12.2016
Quote:
Originally Posted by Konstantinos
I don't see why it wouldn't be. Just try to use a size that is not exaggeration.
|
Sure. I've encountered one more problem; the initial problems are fixed at all. But now, for example I have a 2-3 stage gui and at some point it doesnt work anymore. Test:
CMD:
Код:
CMD:testcmd(playerid) {
if(IsPlayerConnected(playerid)) {
ShowPlayerDialogEx(playerid, 5617, DIALOG_STYLE_LIST, "Test Me", "Test1\nTest2\nTest3\nTest4\nTest4\nTest5", "Wybierz", "Wyjdź");
}
}
OnDialogResponses:
Код:
else if(dialogid == 5617)
{
if(response)
{
switch(listitem)
{
case 0:
{
ShowPlayerDialogEx(playerid,5618,DIALOG_STYLE_MSGBOX,"Test 1","TTest 1","Go back","Exit");
}
case 1:
{
ShowPlayerDialogEx(playerid,5618,DIALOG_STYLE_MSGBOX,"Test 2","TTest 2","Go back","Exit");
}
case 2:
{
ShowPlayerDialogEx(playerid,5618,DIALOG_STYLE_MSGBOX,"Test 3","TTest 3","Go back","Exit");
}
case 3:
{
ShowPlayerDialogEx(playerid,5618,DIALOG_STYLE_MSGBOX,"Test 4","TTest 4","Go back","Exit");
}
case 4:
{
ShowPlayerDialogEx(playerid,5618,DIALOG_STYLE_MSGBOX,"Test 5","TTest 5","Go back","Exit");
}
}
}
}
else if(dialogid == 5618) {
if(response) {
ShowPlayerDialogEx(playerid, 5617, DIALOG_STYLE_LIST, "Test Me", "Test1\nTest2\nTest3\nTest4\nTest4\nTest5", "SELECT", "EXIT");
}
}
Now, whenever I press "Go Back" on "Test X" msgBox without y_dialog included, it works perfectly. But when I do it with y_dialog included, the GUI just closes and again no respond is sent to the OnDialogResponse.
Would appreciate any help.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
Konstantinos - 06.12.2016
Can you debug it? In the hooked OnDialogResponse, print the dialogid and add print messages to see where it stops.
Re: Using y_dialog with y_inline hangs the normal ShowPlayerDialogs -
czop1223 - 07.12.2016
Quote:
Originally Posted by Konstantinos
Can you debug it? In the hooked OnDialogResponse, print the dialogid and add print messages to see where it stops.
|
The log for /testcmd from previous code is:
Dialog_OnDialogResponse called: 0 5617 1 0 Test1 (playerid dialogid response listitem inputtext)
Dialog_OnDialogResponse called: 0 5618 1 -1
*** YSI Error: Dialog ID 5617 already in use
Dialog_OnDialogResponse called: 0 5617 1 1 Test2
*** YSI Error: Dialog ID 5618 already in use
Dialog_OnDialogResponse called: 0 5618 1 -1
*** YSI Error: Dialog ID 5617 already in use
aDialog_OnDialogResponse called: 0 5617 1 4 Test4
*** YSI Error: Dialog ID 5618 already in use
Dialog_OnDialogResponse called: 0 5618 1 -1
*** YSI Error: Dialog ID 5617 already in use
Dialog_OnDialogResponse called: 0 5617 1 0 Test1
*** YSI Error: Dialog ID 5618 already in use
Dialog_OnDialogResponse called: 0 5618 1 -1
The hell, how is it in use?