Hello, everybody I have a problem that I cannot solve.
It's about a dialogues series in which you have to give three right answers, otherwise you will have restart from the beginning.
The first dialogue opens some topics of the second dialogue, depending from the answer given. Then, the second dialogue opens some topics in a third dialogue, always depending from the answer. Because the topics were many, the third dialogue has been split in two dialogues.
If you give the wrong answer in the third dialogue, the options of the last two dialogues are set off and you restart from the first dialogue.
Before I had another problem: if I continued to say the wrong answer, restarting the dialogue for about 15 times, the game crashed displaying a message concerning a recursive call.
I solved this problem by forcing the player to give the solution after a certain number of attempts(and he gets a negative point!), but I felt there was still something to fix.
The new problem shows up in the web version of the game only. If I say the right answer at the first attempt, the problem won't show up. But if I miss the answer just once and then restart the dialogue, a javascript exception gets thrown with these error messages:
Aborted(RuntimeError: unreachable executed)
Uncaught RuntimeError: Aborted(RuntimeError: unreachable executed). Build with -sASSERTIONS for more info.
I'll try to reduce the script removing the recurring parts.
FIRST DIALOGUE(8 AVAILABLE ANSWERS):Spoiler
// Dialog script file
@S // Dialog startup entry point
if(ominoTentativi == 12) //force to skip to final dialogue
{
omino: Dad, I'm tired!
cUomoAppeso: Me too!
omino: You are too weak...
Wait(20);
omino: I want sugar candies...
cUomoAppeso: Finally!
dOminoPapaFinale.Start();
}
else if(ominoTentativi > 0) //after the first attempt, say the following
{
omino: Wrong answer!
omino: Again, what am I thinking about?
}
return
@1 //wrong answer, like options 2, 6
_ominoDialoghi(1, 0); //see functions below
if(ominoGiocattoli) //global var bool, a kind of "if option has been choosen"
omino: Maybe no...
else
omino: Maybe.
dOminoPapa2.Start();
stop
(...)
@3 //right answer
_ominoDialoghi(7, 0);
omino: Maybe.
dOminoPapa2.Start();
stop
@4 //options 4, 5, 7, 8 will return to current dialogue
dOminoPapa1.SetOptionState(4, eOptionOffForever);
return
(...)
SECOND DIALOGUE(3 AVAILABLE ANSWERS):Spoiler
// Dialog script file
@S // Dialog startup entry point
return
@1
if(ominoGiocattoli) //same global var bool, used for the three available options
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33); //see function below
_ominoDialoghi(1, 1); //see function below
dOminoPapa31.Start(); //open part one of third dialogue
stop
@2
if(ominoGiocattoli)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(4, 1);
dOminoPapa31.Start();
stop
@3
if(ominoGiocattoli)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(7, 1);
dOminoPapa31.Start();
stop
(...)
@6
if(ominoVideogame)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(16, 1);
dOminoPapa31.Start();
stop
@7
if(ominoCiboCarne)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(1, 2);
dOminoPapa32.Start(); //open part two of third dialogue
stop
@8
if(ominoCiboPizza)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(4, 2);
dOminoPapa32.Start();
stop
(...)
@12
if(ominoTravestimenti)
omino: Maybe no!
else
omino: Maybe...
_ominoDialoghiCanc(33);
_ominoDialoghi(16, 2);
dOminoPapa32.Start();
stop
THIRD DIALOGUE(SPLIT IN 2, 3 AVAILABLE ANSWERS):Spoiler
// Dialog script file
@S // Dialog startup entry point
return
@1
if(Game.DoOnceOnly("dOminoPapa3101")) //say once when the answer was choosen
{
omino: I don't like that doll...
omino: ...I only like the video-game of Monkey Donk@!
}
if(Game.DoOnceOnly("ominoGiocattoli")) _ominoDialoghiFinale(0); //say once when the previous answer was choosen
else _ominoDialoghiFinale(4); //the second time say another thing
_ominoDialoghiCanc(34);
dOminoPapa1.Start(); //restart
stop
(...)
@10
if(Game.DoOnceOnly("dOminoPapa3110"))
omino: I want it but it's not here.
if(Game.DoOnceOnly("ominoVideogames")) _ominoDialoghiFinale(1);
else _ominoDialoghiFinale(5);
_ominoDialoghiCanc(34);
dOminoPapa1.Start();
stop
(...)
Spoiler
// Dialog script file
@S // Dialog startup entry point
return
@1
if(Game.DoOnceOnly("dOminoPapa3201"))
omino: That's what YOU want!
if(Game.DoOnceOnly("ominoCibo")) _ominoDialoghiFinale(2);
else _ominoDialoghiFinale(60);
_ominoDialoghiCanc(35);
ominoCiboCarne = true;
dOminoPapa1.Start();
stop
@2
if(Game.DoOnceOnly("dOminoPapa3202"))
{
cOmino.FaceDirection(eDirectionLeft);
omino: Like those?
cUomoAppeso: Yes!
cGiostraia.FaceDirection(eDirectionRight);
giostraia: No way!
cOmino.FaceDirection(eDirectionRight);
cGiostraia.FaceDirection(eDirectionDown);
omino: Dad, I don't like chicken!
}
if(Game.DoOnceOnly("ominoCibo")) _ominoDialoghiFinale(2);
else _ominoDialoghiFinale(60);
_ominoDialoghiCanc(35);
ominoCiboCarne = true;
dOminoPapa1.Start();
stop
(...)
@7
if(Game.DoOnceOnly("dOminoPapa3207"))
omino: I would like it but where can you see it?
if(Game.DoOnceOnly("ominoCibo")) _ominoDialoghiFinale(2);
else _ominoDialoghiFinale(62);
_ominoDialoghiCanc(35);
dOminoPapa1.Start();
stop
@8 //right answer
omino: Yes!
omino: You guessed it, daddy!
dOminoPapaFinale.Start();
stop
@9
if(Game.DoOnceOnly("dOminoPapa3209"))
omino: Maybe but it's not here.
if(Game.DoOnceOnly("ominoCibo")) _ominoDialoghiFinale(2);
else _ominoDialoghiFinale(62);
_ominoDialoghiCanc(35);
dOminoPapa1.Start();
stop
(...)
FUNCTIONS TO RESET DIALOGUES:Spoiler
function _ominoDialoghi(int topic, int dialogNumber) //set options state in next dialogue
{
int w = topic;
while(w <= topic + 2) //if I choose 1st answer, set option 1, 2, 3 on, 2nd answer set 4, 5, 6 on etc etc.
{
if(dialogNumber == 0) dialog[33].SetOptionState(w ,eOptionOn);
else if (dialogNumber == 1) dialog[34].SetOptionState(w ,eOptionOn);
else dialog[35].SetOptionState(w ,eOptionOn);
w++;
}
}
function _ominoDialoghiCanc(int dialogNumber) //reset options of the choosen dialogue
{
for(int o = 1; o <= dialog[dialogNumber].OptionCount; o++)
{
if(dialog[dialogNumber].GetOptionState(o) == eOptionOn) dialog[dialogNumber].SetOptionState(o, eOptionOff);
}
}
function _ominoDialoghiFinale(int field) //custom functions for a dialog
{
if(field == 0) //toy
{
//say something
ominoGiocattoli = true;
}
else if(field == 1) //videogame
{
//say something
ominoVideogame = true;
}
else if(field == 2) //food
{
//say something once, this is the right field so I manage it in another way
}
else if(field == 3) //disguise
{
//say something once
ominoTravestimenti = true;
} //say these things if you choose a field twice, the field food has 3 different phrases because it is the right first answer and I reply according to what you chose for as next answer(1st answer: food --> 2nd answer: meat/flours/sweets)
else if(field == 4) cOmino.Say("I said it's not about toys!"); //toy 2nd time
else if(field == 5) cOmino.Say("I can't get any video-game here!"); //videogame 2ndtime
else if(field == 60) cOmino.Say("I don't want meat right now!"); //food/meat
else if(field == 61) cOmino.Say("I don't want anything like pizza, pasta or panini!"); //food/flours
else if(field == 62) cOmino.Say("A sweet may be interesting!"); //food/sweet
else if(field == 7) cOmino.Say("I only want that football shirt and I can't have it!"); //disguises 2nd time
ominoTentativi++; //this function is called when the chose answer is wrong, so I count the attempts at the end
}
If it can help, I can share a video where you can see the moment in which the game crashes and when the error message shows up.
I know that the question might be complex and I hope I wrote enough to understand how the script works. I tested it a lot and the logic seems to be correct (maybe the script can be reduced as well), I don't know what triggers the error in the web version. I hope there's a solution.
Thank you,
Giacomo
Sorry, following is not directly related to your problem, but I wanted to mention this, seeing as you use dialog numbers in many places: usually you can use Dialog variables (pointers) instead:
//if(dialogNumber == 0) dialog[33].SetOptionState(w ,eOptionOn); >>>>
if(dialogNumber == 0) dWhatIsDialogName.SetOptionState(w ,eOptionOn);
And then, if you need to pass dialog number into another function, you may do either this:
//_ominoDialoghiCanc(33); >>>>
_ominoDialoghiCanc(dWhatIsDialogName.ID);
Or you may rewrite the function to use Dialog pointer instead of its number:
function _ominoDialoghiCanc(Dialog* dlg) //reset options of the choosen dialogue
{
for(int o = 1; o <= dlg.OptionCount; o++)
{
if(dlg.GetOptionState(o) == eOptionOn) dlg.SetOptionState(o, eOptionOff);
}
}
then you may call it like
_ominoDialoghiCanc(dWhatIsDialogName);
This overall makes the script more readable, and less prone to accidental mistakes.
Which browser are you using? Can you see anything else on the console? You can set the acsetup.cfg to have ags spit more log information. I think it's just
[log]
stdout = all:all
To get literally everything, and then you can put the log somewhere we can read - when you read it hopefully will give information on where things are just before the crash.
Other than this the way I usually go with my code to figure the origin of the problem is to remove things in large areas to get the game to go back working quickly and slowly add things back until something breaks, and then I remove the last thing to verify if it works again, and so this helps me isolate the issue.
And regarding the code, please use pointers and when possible instead of hardcoding integers as IDs of anything, those a bound to have human mistakes.
Thank you, Crimson. I will follow your suggestion.
Eri0o, I am using Firefox but the problem doesn't depend from the browser, I guess. It was my brother who realized of the error and I know he uses Brave.
I send you a video where you can see the error showing up, it's about after 40 second from the beginning:
https://www.dropbox.com/scl/fi/s09sq0t1v024c7lftjgs5/recordException.zip?rlkey=2r77p7o9aiobz9u15s05nzgz0&st=2j0u7rbp&dl=0
I don't have more information even by adding the [log] string in the config file(I guess it can be inserted anywhere).
I agree with you about removing parts of the code to isolate the problem, but in this case it's quite annoying. I know that the problem is triggered when I switch to another dialogue. I will try to isolate the problem as well and use pointers instead of integers.
I also have another problem that concern with the Scrolling Dialogs module by Khris, indeed I told him about it.
If I press on arrow buttons the game crashes and also this happen on web only.
Anyway, I will try to follow all your suggestions and see if I can manage it somehow. Thank you for your help!
P.S. I have a question regarding android and the conversion of right/left click into taps, can I post it on beginner's tech questions?
@Giacomo could you copy-paste the contents of errors panel here (or save to a text file and upload)?
I mean the errors panel that you show in that video.
Quote from: Giacomo on Fri 18/10/2024 21:04:44P.S. I have a question regarding android and the conversion of right/left click into taps, can I post it on beginner's tech questions?
Sure, I think.
Giacomo could not make a post for some reason (forum problem), so he sent me these callstacks via PM:
Looking at the length of the first callstack, can this be a stack overflow because of a recursion?
ERROR 1
Spoiler
Aborted(RuntimeError: unreachable executed) localhost:8080:1:12484
printErr http://localhost:8080/:1
abort http://localhost:8080/ags.js:1
runAndAbortIfError http://localhost:8080/ags.js:1
maybeStopUnwind http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
doRewind http://localhost:8080/ags.js:1
handleSleep http://localhost:8080/ags.js:1
callUserCallback http://localhost:8080/ags.js:1
safeSetTimeout http://localhost:8080/ags.js:1
(Asinc.: setTimeout handler)
safeSetTimeout http://localhost:8080/ags.js:1
_emscripten_sleep http://localhost:8080/ags.js:1
handleSleep http://localhost:8080/ags.js:1
_emscripten_sleep http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:3127678
<anonima> http://localhost:8080/ags.wasm:6290554
<anonima> http://localhost:8080/ags.wasm:1474006
<anonima> http://localhost:8080/ags.wasm:673255
<anonima> http://localhost:8080/ags.wasm:5888127
<anonima> http://localhost:8080/ags.wasm:6718508
<anonima> http://localhost:8080/ags.wasm:5888349
<anonima> http://localhost:8080/ags.wasm:2433407
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:228403
<anonima> http://localhost:8080/ags.wasm:396044
<anonima> http://localhost:8080/ags.wasm:412727
<anonima> http://localhost:8080/ags.wasm:401156
<anonima> http://localhost:8080/ags.wasm:692903
<anonima> http://localhost:8080/ags.wasm:1247968
<anonima> http://localhost:8080/ags.wasm:555818
<anonima> http://localhost:8080/ags.wasm:5992611
<anonima> http://localhost:8080/ags.wasm:2486394
<anonima> http://localhost:8080/ags.wasm:2079011
<anonima> http://localhost:8080/ags.wasm:2073672
<anonima> http://localhost:8080/ags.wasm:2083564
<anonima> http://localhost:8080/ags.wasm:6541308
<anonima> http://localhost:8080/ags.wasm:2852711
x http://localhost:8080/ags.js:1
invoke_iiiii http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:204605
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174127
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:2381559
<anonima> http://localhost:8080/ags.wasm:6174598
<anonima> http://localhost:8080/ags.wasm:2557198
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:2378943
<anonima> http://localhost:8080/ags.wasm:6540280
<anonima> http://localhost:8080/ags.wasm:2853185
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4876650
<anonima> http://localhost:8080/ags.wasm:6541119
<anonima> http://localhost:8080/ags.wasm:1416519
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:205172
<anonima> http://localhost:8080/ags.wasm:839132
<anonima> http://localhost:8080/ags.wasm:6540085
<anonima> http://localhost:8080/ags.wasm:2852711
x http://localhost:8080/ags.js:1
invoke_iiiii http://localhost:8080/ags.js:1
<anonima> http://localhost:8080/ags.wasm:4877443
<anonima> http://localhost:8080/ags.wasm:6541119
ERROR 2
Spoiler
Uncaught RuntimeError: Aborted(RuntimeError: unreachable executed). Build with -sASSERTIONS for more info.
abort http://localhost:8080/ags.js:1
runAndAbortIfError http://localhost:8080/ags.js:1
maybeStopUnwind http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
doRewind http://localhost:8080/ags.js:1
handleSleep http://localhost:8080/ags.js:1
callUserCallback http://localhost:8080/ags.js:1
safeSetTimeout http://localhost:8080/ags.js:1
setTimeout handler*safeSetTimeout http://localhost:8080/ags.js:1
_emscripten_sleep http://localhost:8080/ags.js:1
handleSleep http://localhost:8080/ags.js:1
_emscripten_sleep http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_iiiii http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_vi http://localhost:8080/ags.js:1
x http://localhost:8080/ags.js:1
invoke_v http://localhost:8080/ags.js:1
ags.js:1:8009
@Giacomo Can the game be configured to load and cause the error as soon as possible? If it can it would be nice to get a link to such build.
The callstack in the web build is a bit complex because there's some magic going on to handle the different game loops in AGS engine, so I would need to run it through a debugger to make some sense of it.
I can post again. Sure,
@eri0o:
Here's the download link.
https://www.dropbox.com/scl/fo/8ftrdybiq5ognywcrv7a6/APv3A42uW15PSLo9PVNyGWs?rlkey=vw0ldgdywa2hvqk07av74w9hl&st=yt3d0dvi&dl=01) Start the game.
2) Open menu and click on character drawn on the right of the menu GUI
3) Click on "All dialogues" button. Now all the introducing dialogues have been set to done.
4) Walk right and go to 3rd scenario, walk close to the pole in the right of the screen.
5) Save the game
6) Look at the pole to start conversation with the hanging man.
7) Choose option 6(talk about a plan B)and then option 6 again(say you don't have any ideas)
8) Now the dialogues quest start. I left a little of phrases that I found funny, anyway, with a really few clicks you will skip them all and start the dialogue.
One last thing, I put it in spoiler because it's a solution of the game!
Spoiler
Answers 4, 5, 7, 8 don't affect with the process, but if you click on them, they will be set off.
Correct answer is: food / sweets / sugar candies
All the others will take you back to the beginning
If you go straight for "sugar candies", the exception won't be thrown.
If you go for "sugar candies" the 2nd time, the exception will be thrown.
If you go for any wrong answer, the 2nd time you start the dialog, the exception will be thrown.
If you need anything else, just send me a message. Thank you very much.
@Giacomo , the link you shared is not for the game, it looks like some sheet music for some classical music, and I think there is one for Monkey Island (and One Piece?) :-D
Sorry...this happen when you're on rush because your family is buzzing around you...
Here's the link to the game:
https://www.dropbox.com/scl/fi/evlq81tgw77ogsj6benvc/falco_debugCopy.zip?rlkey=mqipijes6vwrz2yaodxtsbn5i&st=gj0qu7dy&dl=0
Yes, there's also Bink no sake of One Piece! yohohoho
I can confirm that error reproduces 100% following the steps under the "spoiler".
(i've been running on local server, so it's not related to where the game is, alright.)
Something that bugs me, why is ags.js written as a single line? Lol. This makes it extra difficult to understand the callstack, because there are several calls to "ags.js:1".
Is there a way to regenerate ags.js with proper line indentation, at least for debugging purposes?
I also wish that viewing ags.wasm in browser displayed comments around functions to let know which original engine function this relates too... No idea if that's possible at all.
EDIT:
@Giacomo, somehow nobody asked before, but which version of AGS did you make this game with?
judging by some lines in ags.wasm, it is 3.6.0.52, is that correct?
@Crimson Wizard, I confirm that the version of AGS I am using is the last one.
Anyway, I contacted Khris for another problem with the web version of the game. It seems to concern with his Scrolling Dialogs module:
when I press on arrow buttons, the game crashes and he said that it seems to be stacking in a loop. Scrolling with the mouse trough the dialogue options works fine instead.
Maybe the two problems are correlated as the game crashes when I am inside a dialogue and I'm using his module; he's doing some tests to understand why this happen on web.
Quote from: Giacomo on Mon 21/10/2024 08:47:07Anyway, I contacted Khris for another problem with the web version of the game. It seems to concern with his Scrolling Dialogs module:
when I press on arrow buttons, the game crashes and he said that it seems to be stacking in a loop. Scrolling with the mouse trough the dialogue options works fine instead.
Hmm, yes, it happens immediately when you click on a scroll button. Although there's no crash it seems, only game update hangs forever for some reason.
Usually this is an indication of script running in an endless loop, or engine doing the same.
Can you tell where I can get this module, or is it exclusively made for your game?
I see this one:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-scrollingdialog-v3-0-updated-27-january-2016/
but it's made by monkey0506, not Khris.
I tried to build the AGS engine for debugging. I didn't attempt to build the exact version you used but instead I decided to build the one in this commit here https://github.com/adventuregamestudio/ags/tree/744406cd444ca935685d235ca8368af71f7d1154 (it was current master when I built).
I actually put a build of it here publicly (https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/), along with the corresponding ags source files, so one can run it on the Chrome Dev Tools debugger and follow along in the cpp files. You just attach your game files there and it should start.
Unfortunately, I am having an error much earlier, in Step 6, I started the conversation with the hanging man, but as I understand to do step 7 I need to click to scroll the dialogs to get to the sixth option, but unfortunately clicking on the scroll hangs the game. You can easily reproduce it by running in the url above.
I put a release build in agsjs website (https://ericoporto.github.io/agsjs/), using the same commit, just to test if it's some issue with the debug build, but unfortunately, it reproduces.
Could you give me the code for how you make that scroll in the dialog? I would like to figure the minimal thing necessary to reproduce that bug. After that one can be fixed we can try moving to the other.
Spoiler
Also I see a few messages in the console reggarding the save
22:59:28:194: Unable to read save's description.
agsjs/:1 22:59:28:194: File not found or could not be opened.
agsjs/:1 22:59:28:195: Requested filename: /home/web_user/saved_games/Lightning strike in town festival/agssave.052.
agsjs/:1 22:59:28:198: Unable to read save's description.
agsjs/:1 22:59:28:198: File not found or could not be opened.
agsjs/:1 22:59:28:198: Requested filename: /home/web_user/saved_games/Lightning strike in town festival/agssave.053.
agsjs/:1 22:59:28:203: Unable to read save's screenshot.
agsjs/:1 22:59:28:204: File not found or could not be opened.
agsjs/:1 22:59:28:204: Requested filename: /home/web_user/saved_games/Lightning strike in town festival/agssave.050.
agsjs/:1 22:59:28:204: Unable to read save's screenshot.
agsjs/:1 22:59:28:204: File not found or could not be opened.
agsjs/:1 22:59:28:204: Requested filename: /home/web_user/saved_games/Lightning strike in town festival/agssave.050.
agsjs/:1 22:59:28:205: Unable to read save's screenshot.
agsjs/:1 22:59:28:205: File not found or could not be opened.
agsjs/:1 22:59:28:205: Requested filename: /home/web_user/saved_games/Lightning strike in town festival/agssave.050.
I guess you hardcoded the save files in the gui, the nice approach is to fill an out of screen or invisible list box with the saves and then retrieving them from the listbox.
Quote from: eri0o on Wed 23/10/2024 03:05:01Unfortunately, I am having an error much earlier, in Step 6, I started the conversation with the hanging man, but as I understand to do step 7 I need to click to scroll the dialogs to get to the sixth option, but unfortunately clicking on the scroll hangs the game.
That's what Giacomo also mentioned in his last post. You need to use mouse wheel to scroll and get to the crash.
Quote from: Crimson Wizard on Tue 22/10/2024 23:56:28Quote from: Giacomo on Mon 21/10/2024 08:47:07Anyway, I contacted Khris for another problem with the web version of the game. It seems to concern with his Scrolling Dialogs module:
Can you tell where I can get this module, or is it exclusively made for your game?
I see this one:
https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-scrollingdialog-v3-0-updated-27-january-2016/
but it's made by monkey0506, not Khris.
Could it be this module (https://www.adventuregamestudio.co.uk/forums/modules-plugins-tools/module-chatdisplay-show-a-whatsapp-like-dialogue-on-gui-button/)? It's been the cause of problems before.
Thank you people for your interest.
Khris sent me the module via PM, I tried to search for it in AGS website and I couldn't find it either.
I'd rather ask
@Khris the permission to send you the module, though I guess there is no problem; but let's wait an answer from him.
@eri0o You are right, I harcoded the save GUI because I wanted to take a screenshot of the player in his position.
I wasn't able to use the list box and make it work using a loop.
I had no problem with it on windows and web(so far!), but of course the code can be reduced and be rewritten much better.
It's this one: https://drive.google.com/file/d/19uyh4VBjeMkhg-oNX2RC-STsw7IGG9Bl/view?usp=drive_link
I only publish modules in their own threads after extensive testing (i.e. never). This one was thrown together in an afternoon.
Quote from: Khris on Wed 23/10/2024 10:46:45It's this one: https://drive.google.com/file/d/19uyh4VBjeMkhg-oNX2RC-STsw7IGG9Bl/view?usp=drive_link
This is likely a culprit:
void noloopcheck dialog_options_mouse_click(DialogOptionsRenderingInfo *info, MouseButton button) {
if (button == eMouseLeft) {
if (_mouseOverUpArrow && _showUpArrow) {
while (mouse.IsButtonDown(eMouseLeft)) {} // <--------------------------------------
_scrolledDown--;
}
if (_mouseOverDownArrow && _showDownArrow) {
while (mouse.IsButtonDown(eMouseLeft)) {} // <--------------------------------------
_scrolledDown++;
}
}
<...>
}
void noloopcheck dialog_options_key_press(DialogOptionsRenderingInfo *info, eKeyCode keycode, int mod) {
if (_keyboardScrolling && keycode == eKeyUpArrow && _showUpArrow) {
while (IsKeyPressed(eKeyUpArrow)) {} // <--------------------------------------
_scrolledDown--;
return;
}
if (_keyboardScrolling && keycode == eKeyDownArrow && _showDownArrow) {
while (IsKeyPressed(eKeyDownArrow)) {} // <--------------------------------------
_scrolledDown++;
return;
}
<...>
}
The problem is that engine does not guarantee updates of mouse or key states unless control is passed back to it. So empty loops like that are not reliable.
I would even say that this should not work.
Frankly, I'm not sure how it works on desktop systems, maybe by accident... Like, maybe the buttons are no longer pressed anymore when the script enters these lines. Probably it works bit differently on Web version.
EDIT:
roflmao... just like I knew it, this is a comment from the engine code inside IsKeyPressed:
// old input handling: update key state in realtime
// left only in case if necessary for some ancient game, but
// this really may only be required if there's a key waiting loop in
// script without Wait(1) to let engine poll events in a natural way.
if (game.options[OPT_KEYHANDLEAPI] == 0)
SDL_PumpEvents();
Mouse.IsButtonDown does not have this.
A fixed version is now online under the same link.
Thanks
@Crimson Wizard :)
Thank you, now the arrow buttons are working fine!
I still see the exception in the dialogues series, do you think it is fixable or should I review the script?
In the last case, I need to ask for help again, I'm sorry but I don't know where to turn.
Run it here: https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/
paste the error you get in the console under a code tag and inside a spoiler here in the forums. This build should give more complete error log from the console in chrome dev tools - I mean the specific JS messages, they should mention the specific lines in the ags engine code where it's hitting an issue.
Or perhaps if you have an updated build somewhere, and could share it?
Edit: I tried running the old build and using the wheel to get to the error, but the error is somehow in a part of the wasm where it appears it doesn't map to a source file??? (wth, how?)
And also the callstack is showing only things in Emscripten itself... I have never caused something like this, so I have no idea, it would be interesting to get the game source to see in the script what is being called at such point that could cause this. I wonder which ags features the game is using too - things like lipsync and other too classic adventure stuff I basically never used, so I have no idea if it's a bug in one of those old parts of the code somehow... Anyway, it would be nice to get the code to try to comeup with an easier way to reproduce this, since I would like to instrument the code but these make running anything really really slow and doing so much stuff to reproduce is painful.
error.log (https://gist.github.com/ericoporto/d7ff6151564ef8c3384accbe3ebaac69)
ags.html:615 Aborted(RuntimeError: unreachable)
printErr @ ags.html:615
abort @ ags.js:439
runAndAbortIfError @ ags.js:12064
maybeStopUnwind @ ags.js:12163
ret.<computed> @ ags.js:12114
doRewind @ ags.js:12212
(anonymous) @ ags.js:12238
callUserCallback @ ags.js:4919
(anonymous) @ ags.js:7257
setTimeout
safeSetTimeout @ ags.js:7255
(anonymous) @ ags.js:11861
handleSleep @ ags.js:12223
_emscripten_sleep @ ags.js:11861
$Emscripten_GLES_SwapWindow @ SDL_emscriptenopengles.c:93
$byn$fpcast-emu$Emscripten_GLES_SwapWindow @ ags.wasm:0x7cb61f
$SDL_GL_SwapWindowWithResult @ SDL_video.c:4205
$SDL_GL_SwapWindow @ SDL_video.c:4210
$AGS::Engine::OGL::OGLGraphicsDriver::Render(int, int, AGS::Common::GraphicFlip) @ ali3dogl.cpp:1181
$byn$fpcast-emu$AGS::Engine::OGL::OGLGraphicsDriver::Render(int, int, AGS::Common::GraphicFlip) @ ags.wasm:0x6f022e
$AGS::Engine::OGL::OGLGraphicsDriver::Render() @ ali3dogl.cpp:965
$byn$fpcast-emu$AGS::Engine::OGL::OGLGraphicsDriver::Render() @ ags.wasm:0x6f014a
$dynCall_vi @ ags.wasm:0x6e3956
ret.<computed> @ ags.js:12110
invoke_vi @ ags.js:13305
$render_to_screen() @ draw.cpp:1198
$render_graphics(AGS::Engine::IDriverDependantBitmap*, int, int) @ draw.cpp:2958
$UpdateGameOnce(bool, AGS::Engine::IDriverDependantBitmap*, int, int) @ game_run.cpp:1027
$GameTick() @ game_run.cpp:1148
$GameLoopUntilState::Run() @ game_run.cpp:184
$byn$fpcast-emu$GameLoopUntilState::Run() @ ags.wasm:0x736b0c
$dynCall_ii @ ags.wasm:0x6e3866
ret.<computed> @ ags.js:12110
invoke_ii @ ags.js:13239
$GameLoopUntilEvent(int, void const*, int, int) @ game_run.cpp:1165
$GameLoopUntilNoOverlay() @ game_run.cpp:1210
$display_main(int, int, int, char const*, TopBarSettings const*, int, int, int, int, int, bool, bool) @ display.cpp:441
$_displayspeech(char const*, int, int, int, int, int) @ character.cpp:2911
$Sc_Character_Say(void*, RuntimeScriptValue const*, int) @ character.cpp:2956
$byn$fpcast-emu$Sc_Character_Say(void*, RuntimeScriptValue const*, int) @ ags.wasm:0x75d775
$ccInstance::Run(int) @ cc_instance.cpp:1363
$ccInstance::CallScriptFunction(AGS::Common::String const&, int, RuntimeScriptValue const*) @ cc_instance.cpp:463
$byn$fpcast-emu$ccInstance::CallScriptFunction(AGS::Common::String const&, int, RuntimeScriptValue const*) @ ags.wasm:0x78bdd5
$dynCall_iiiii @ ags.wasm:0x6e3e04
ret.<computed> @ ags.js:12110
invoke_iiiii @ ags.js:13327
...
OK, just switching for software renderer and setting full log and it still crashes
https://gist.github.com/ericoporto/c247bcb751153c43a73cf3fa6990258b
(for anyone reading the log, I think once it crashes the chronological order of the log is reversed...)
Just curious, the character cUomoAppeso is in the room before it becomes the player character? Is there any fun code around the place that it happens? Also does view 26 have something weird vs other views?
@Giacomo , since it crashes at some dialog option, I think you could post at least the code of what happens in that dialog option, to give us any idea of what this crash may be related to.
Also, since it crashes not anytime, but if player selects few other wrong options first, maybe post the code of these options too.
Do you, perhaps, know if there's anything that happens in these wrong options that may affect the script of the correct one?
Or is there anything in these wrong options that may affect the game state? (setting variables, changing object properties, etc)
Ugh! @Giacomo PMed me because he can't post on forums again for some reason. I will ask AGA to maybe look into this.
Here's Giacomo's message he asked me to post here:
@eri0o I'm sorry, I don't undertsand many things because I am no programmer but I'll do my best to let you help me!
cUomoAppeso is already in the room before he becomes the player.
View 26 belongs to the woman in the first scenario, it's for her idle view and for a couple of animations she does once.
Yes, I installed LipSync, I thought it could be used also for tranlsation but I realized don't need it...does anything change if I remove it?
@Crimson Wizard I posted the code of the dialogue options when I made the post, removing only the repetitive script. The dialogue doens't affect anything else in the room.
It's supposed to be a quest where you can't go on until you give the right answer and, to avoid problems due to recursive calls, I chose to force the player to close the dialogue when he miss the answer too many times.
Now the expection is thrown also in the first dialogues series of the game, that the player does once only and where any answer takes to the next dialogue.
I took a video of the first dialogues series, the exception is thrown at 1'14''.
I'm sure I didn't modify anything, but the script that Crimson suggested me and that concerns with the hanging man(cUomoAppeso) dialogues series only.
Download video (https://www.dropbox.com/scl/fi/edebkep3y61jhy0og7xj9/recordException2.zip?rlkey=o8hr5rpjotn9hulc75cl547tx&st=sao2q3t2&dl=0)
Errors log:
Spoiler
Aborted(RuntimeError: unreachable executed) ags_362_cm_744406cd444c:615:96
printErr https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/:615
abort https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:439
runAndAbortIfError https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12029
maybeStopUnwind https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12128
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12079
doRewind https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12177
handleSleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12203
callUserCallback https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:4919
safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7257
(Asinc.: setTimeout handler)
safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7255
_emscripten_sleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:11826
handleSleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12188
_emscripten_sleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:11826
Emscripten_GLES_SwapWindow https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:5861331
emu$Emscripten_GLES_SwapWindow https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7235175
SDL_GL_SwapWindowWithResult https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:5928835
ags.wasm.AGS::Engine::OGL::OGLGraphicsDriver::Render(int, int, AGS::Common::GraphicFlip) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:223704
ags.wasm.byn$fpcast-emu$AGS::Engine::OGL::OGLGraphicsDriver::Render(int, int, AGS::Common::GraphicFlip) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6426698
ags.wasm.AGS::Engine::OGL::OGLGraphicsDriver::Render() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:223501
ags.wasm.byn$fpcast-emu$AGS::Engine::OGL::OGLGraphicsDriver::Render() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6426478
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.render_to_screen() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1492729
ags.wasm.render_graphics(AGS::Engine::IDriverDependantBitmap*, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1560194
ags.wasm.UpdateGameOnce(bool, AGS::Engine::IDriverDependantBitmap*, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:987178
ags.wasm.GameTick() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:995053
ags.wasm.GameLoopUntilState::Run() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:996930
ags.wasm.byn$fpcast-emu$GameLoopUntilState::Run() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6700032
dynCall_ii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383696
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_ii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13202
ags.wasm.GameLoopUntilEvent(int, void const*, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:993771
ags.wasm.display_main(int, int, int, char const*, TopBarSettings const*, int, int, int, int, int, bool, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1584219
ags.wasm._displayspeech(char const*, int, int, int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1927743
ags.wasm.Sc_Character_Say(void*, RuntimeScriptValue const*, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1966472
ags.wasm.byn$fpcast-emu$Sc_Character_Say(void*, RuntimeScriptValue const*, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6838665
ags.wasm.ccInstance::Run(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2617988
ags.wasm.ccInstance::CallScriptFunction(AGS::Common::String const&, int, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2596704
ags.wasm.byn$fpcast-emu$ccInstance::CallScriptFunction(AGS::Common::String const&, int, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014715
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2806936
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.run_dialog_option(int, int, int, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2000199
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021467
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.run_dialog_option(int, int, int, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2000199
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021467
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.run_dialog_option(int, int, int, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2000199
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021467
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.run_dialog_option(int, int, int, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2000199
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021467
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.run_dialog_option(int, int, int, bool) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2000199
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021467
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.byn$fpcast-emu$RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6859176
dynCall_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384927
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_iiiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13290
ags.wasm.run_dialog_script(int, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2004270
ags.wasm.do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2021015
ags.wasm.byn$fpcast-emu$do_conversation(int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015564
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2811246
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.RunScriptFunctionAuto(ScriptType, ScriptFunctionRef const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2842881
ags.wasm.byn$fpcast-emu$RunScriptFunctionAuto(ScriptType, ScriptFunctionRef const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015784
dynCall_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384414
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13235
ags.wasm.post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2812179
ags.wasm.byn$fpcast-emu$post_script_cleanup() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7014866
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.RunScriptFunction(ccInstance*, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2807532
ags.wasm.RunScriptFunctionAuto(ScriptType, ScriptFunctionRef const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2842600
ags.wasm.byn$fpcast-emu$RunScriptFunctionAuto(ScriptType, ScriptFunctionRef const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7015784
dynCall_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384414
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13235
ags.wasm.QueueScriptFunction(ScriptType, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:2839892
ags.wasm.byn$fpcast-emu$QueueScriptFunction(ScriptType, AGS::Common::String const&, unsigned long, RuntimeScriptValue const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6763297
dynCall_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384414
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_viiii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13235
ags.wasm.process_event(AGSEvent const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1994266
ags.wasm.byn$fpcast-emu$process_event(AGSEvent const*) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6858574
dynCall_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383934
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vi https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13268
ags.wasm.UpdateGameOnce(bool, AGS::Engine::IDriverDependantBitmap*, int, int) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:987780
ags.wasm.GameTick() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:995053
ags.wasm.RunGameUntilAborted() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:994482
ags.wasm.byn$fpcast-emu$RunGameUntilAborted() https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6713579
call https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6040621
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_v https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13312
ags.wasm.initialize_start_and_play_game(int, AGS::Common::String const&) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1104779
ags.wasm.byn$fpcast-emu$initialize_start_and_play_game(int, AGS::Common::String const&) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6738663
dynCall_vii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6384162
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_vii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13224
ags.wasm.initialize_engine(std::__2::map<AGS::Common::String, std::__2::map<AGS::Common::String, AGS::Common::String, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, AGS::Common::String>>>, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, std::__2::map<AGS::Common::String, AGS::Common::String, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, AGS::Common::String>>>>>> const&) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:1247582
ags.wasm.byn$fpcast-emu$initialize_engine(std::__2::map<AGS::Common::String, std::__2::map<AGS::Common::String, AGS::Common::String, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, AGS::Common::String>>>, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, std::__2::map<AGS::Common::String, AGS::Common::String, std::__2::less<AGS::Common::String>, std::__2::allocator<std::__2::pair<AGS::Common::String const, AGS::Common::String>>>>>> const&) https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6945564
dynCall_ii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:6383696
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
invoke_ii https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:13202
main https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:114389
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12075
doRewind https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12177
handleSleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12203
callUserCallback https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:4919
safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7257
(Asinc.: setTimeout handler)
safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7255
_emscripten_sleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:11826
handleSleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12188
_emscripten_sleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:11826
Emscripten_GLES_SwapWindow https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:5861331
emu$Emscripten_GLES_SwapWindow https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:7235175
SDL_GL_SwapWindowWithResult https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.wasm:5928835
Spoiler
Uncaught RuntimeError: Aborted(RuntimeError: unreachable executed). Build with -sASSERTIONS for more info.
abort https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:459
runAndAbortIfError https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12029
maybeStopUnwind https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12128
x https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12079
doRewind https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12177
handleSleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:12203
callUserCallback https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:4919
safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7257
setTimeout handler*safeSetTimeout https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:7255
_emscripten_sleep https://ericoporto.github.io/public_html/ags_362_cm_744406cd444c/ags.js:11826
ags.js:459:11
EDIT: ah, right, there are these dialog scripts in the first post, I completely forgot about them, sorry.
Ok, I can text again, thank you
@Crimson Wizard for posting mt messages!
Let me ask you one more thing: If I run a dialogue and every of its options take me to another unique dialogue, and so on until the last dialogue of the series closes everything, should I put "return" or "stop" at the end of the options of the previous dialogues?
On the dialgues series of the hanging man(cUomoAppeso) I changed every "return" to "stop".
On the first dialogues series of the game every option still has "return", while The last dialogue has "stop" at the end of the startup point and no option.
Quote from: Giacomo on Thu 24/10/2024 12:52:06Let me ask you one more thing: If I run a dialogue and every of its options take me to another unique dialogue, and so on until the last dialogue of the series closes everything, should I put "return" or "stop" at the end of the options of the previous dialogues?
The manual says:
Quote"return" tells AGS to go back and display the choices again to the player. If you use "stop" instead of return, then the conversation is ended. Alternatively, you can use "goto-dialog" or "goto-previous", which abort the current dialog script and transfer control to the new dialog.
@Giacomo Sorry for delay, I finally found time to check this out.
Quote from: Giacomo on Thu 24/10/2024 12:52:06Let me ask you one more thing: If I run a dialogue and every of its options take me to another unique dialogue, and so on until the last dialogue of the series closes everything, should I put "return" or "stop" at the end of the options of the previous dialogues?
So, this question made me look more closely to how do you change the dialogs, and it turned out you were making a mistake.
The problem is not only whether you do "return" or "stop", the main problem is that you were calling Dialog.StartDialog() from within a dialog script. Like this:
dOminoPapaFinale.Start();
<...>
return
or this:
dOminoPapa31.Start(); //open part one of third dialogue
stop
When you call Dialog.Start() from inside another dialog, AGS actually starts a new Dialog "state"
before exiting previous one. When you have multiple calls like that done in sequence, there appear multiple "nested" Dialogs running inside each other, like:
- Dialog1
-- Dialog2
-- Dialog3
-- Dialog4
Furthermore, if you call one of the previous dialogs again in a same way, the dialog states duplicate! Like:
- Dialog1
-- Dialog2
-- Dialog1
-- Dialog2
In theory, this may go forever. But computer does not have infinite nesting power, so at some point it cannot create more of these "dialog states", and crashes. Windows version also crashes eventually, you just need to hit more options to cause this.
This probably may be considered a mistake in AGS design, because it does not handle this correctly, nor reports any warnings about potential issue.
The simplest way to reproduce this bug is to have 2 dialogs that start each other recursively:
Spoiler
//// DIALOG 1
// Dialog script file
@S // Dialog startup entry point
return
1
narrator: start dialog 2
dDialog2.Start();
stop
2
narrator: stop here
stop
//// DIALOG 2
// Dialog script file
@S // Dialog startup entry point
return
1
narrator: start dialog 1
dDialog1.Start();
stop
2
narrator: stop here
stop
Then run the Dialog1 and keep hitting option 1 at every next step. Eventually, the game will crash.
So how should this be solved?
First of all
DO NOT CALL Dialog.Start function from inside the dialog script!Instead, use one of the dialog script commands to change between dialogs, as mentioned by
@heltenjon above.
I will quote a bigger section of the manual:
https://adventuregamestudio.github.io/ags-manual/DialogScript.html#dialog-commands
Quotegoto-dialog X
Switches the current topic to Topic X, and displays the current list of choices for that topic.
goto-previous
Returns to the previous topic that this one was called from. If the dialog started on this topic, then the dialog will be stopped.
return
Stops the script and returns to the list of choices.
stop
Stops the conversation and returns the player to the game.
So, instead of using dOminoPapa31.Start() you should be doing "goto-dialog dOminoPapa31".
"goto-dialog" also practically works like "stop" for the current dialog, except it opens a new dialog after current one exits.
That should solve your problem.
EDIT:I suppose that this behavior of Dialog.Start has to be fixed in AGS engine though.
It seems that Dialog.Start is allowed to be called from "dialog_request", that's a callback function that is run when you have a text parser in dialog options.
And apparently it works, although technically still being called from inside the current Dialog state.
So we need to do the same to work even if Dialog.Start was called directly inside dialog script.
Probably this was meant to work back when normal script was not supported inside dialog scripts.
But after normal script was allowed there, commands like Dialog.Start were not adjusted properly.
Thank you
@heltenjon and
@Crimson Wizard.
Yes, I read that part of the manual, more times ro be honest, because the explanation wasn't very clear to me, for the most the part about the functions goto dialogs, goto previous etc. I did a lot of tests but I couldn't make the script work as I wanted at the end I found that by this way the game didn't crash...so far! Ok, I have a lot of work to do but I'll definitely make it work!
But I will wait before signing the post as solved, just to see if the problem shows up again or not in web version.
The custom dialogues script is something really cool, and I showed how it works to my friends who helped me with the game. Maybe it needs some fixes, yes, but you guys did something great to prevent a lot of scripts in an engine made for graphic adventures, which are full of dialgues!
Thank you again, I am going to work on it!
EDIT: All right, it's working!!! Thank you, thank you, thank you!
I am going to test all the dialogues to be sure and then mark the post as solved.
Sorry, I made you do a lot of work for just a stupid error...Now I learned soemthing very useful:
Inside a dialogue series, use "goto-dialog" at the end of every option, not "stop" nor "return".A little suggestion: it would ne nice to mark the goto in blue, like stop and return, that would make it easier to understand for stupid newbies like me! Thanks!
While warning about the nesting somehow is best, I wonder if, since there should be a way to test that it is inside a dialog, if there would be a way that in such case it could be delayed to happen after. At least I don't feel that the nesting is expected - even though it happens. The issue there is it would trigger a dialog end and start event by doing this way - at least I think?
Quote from: eri0o on Sun 27/10/2024 18:12:21While warning about the nesting somehow is best, I wonder if, since there should be a way to test that it is inside a dialog, if there would be a way that in such case it could be delayed to happen after. At least I don't feel that the nesting is expected - even though it happens. The issue there is it would trigger a dialog end and start event by doing this way - at least I think?
I'm currently working on this in 3.6.2 branch. Not sure if I like to apply this to a 3.6.1 patch... the change I found working is not that big, but it alters the game state flow, and i don't feel 100% confident about it just yet.
It won't trigger the dialog end/start events, it will work more like as if a option script returned with a proper "goto-dialog" command.
When Dialog.Start is called within a script, it's actually scheduled to run after script completes, similar to ChangeRoom, and few other things.
So, this "post-script" execution seems a convenient place to do this.
I found a possible trick: while processing this scheduled command, check if we are inside a dialog, and then not start a new dialog loop, but override the script's return value that is going to be passed back into the current running dialog loop. This return value contains a instruction of what to do (stop dialog, switch to another topic, etc).
In a way, Dialog.Start called within a dialog script will work more like a postponed "goto-dialog".
Probably best to have it at 3.6.2 branch where it's still in beta and we can test with a bunch of old games and see if it doesn't happen to break anything, and later it may be just a bugfix that isn't backported - I think if the current behavior was an issue in some old game, something would have cropped up from the ScummVm testers.
Quote from: Crimson Wizard on Sun 27/10/2024 18:32:18When Dialog.Start is called within a script, it's actually scheduled to run after script completes, similar to ChangeRoom, and few other things.
So, this "post-script" execution seems a convenient place to do this.
I found a possible trick: while processing this scheduled command, check if we are inside a dialog, and then not start a new dialog loop, but override the script's return value that is going to be passed back into the current running dialog loop. This return value contains a instruction of what to do (stop dialog, switch to another topic, etc).
In a way, Dialog.Start called within a dialog script will work more like a postponed "goto-dialog".
This sounds like it would work great. I think it would give the expected behavior as an adventure game even though it may not be as consistent when think purely as a programmer (that would expect the nested dialogs).
Quote from: eri0o on Sun 27/10/2024 22:23:03I think it would give the expected behavior as an adventure game even though it may not be as consistent when think purely as a programmer (that would expect the nested dialogs).
To clarify, when I speak of "nested dialog loops", I meant literally - update loops.
Dialog topics themselves can be made nested logically, but run inside a single update loop, using a dialog topic stack. For instance, right now the dialog "executor" saves a history of dialog topics, letting you to return back to the previous ones if necessary ("goto-previous" command).
It may be not fully clear from the syntax's perspective, but it is an available option.
OK, I am definitively having some troubles and they all concern with the "if" statement.
1)I interact with a character, the player walk towards it(with a blocking function), face it, and then the dialogue start.
The convenience of dialogues script is that I can insert command line inside it, but here comes the first trouble.
I put a condition for which, if it's the first time that player talks with this character, I skip some command lines in the entry point and jump to another dialogue, like this:
INTERACT WITH CHARACTERSpoiler
function cLei_Interact()
{
if(condition) blablabla
[...]
else dLei.Start(); //walk, look at are inside dialogue script, but for the frist time you should jump to another dialogue from the entry point of this
}
DIALOGUE 1Spoiler
@S // Dialog startup entry point
player.Walk(cLei.x - 26, cLei.y, 1);
player.FaceDirection(eDirectionDownRight);
if(!diagLei) dLeiInizio1.Start();
return
How can I force to jump to another dialogue without having to repeat the commands line to walk and face character?
If not possible, I will simply insert them in the cChar_Interact() function, but I'd have to do this for a lot of characters.
2)In a dialogue the player has to say all the available options before going to the next dialogue, and the options are all set off once they have been clicked on, like this:
DIALOGUE 2Spoiler
[...]
@2
player:blablabla...
dThisDialogue.SetOptionState(2, eOptionOffForever);
if(dThisDialogue.OptionCount == 0) dAnotherDialogue.Start();
return
[...]
3)Last one concern with a random number that is generated and from that choose which dialogue to jump into.
DIALOGUE 3:Spoiler
[...]
@6
_generateNumber();
if(number == 1) dDialogue1.Start;
else if(number == 2) dDialogue2.Start();
else if(number == 3) dDialogue3.Start();
else if(number == 4) dDialogue4.Start();
[...]
return
I have a lot of other dialogues with similar problems and I tried to reduce the argument in order to put it simple.
1)In a startup entry point, move to another dialogue if you met a particular condition or go on until the end.
2)In an option of a dialogue, when no more options are available, move to another dialogue, otherwise return to current dialogue.
3)Given a random number, in an option of a dialogue, jump to a dialogue or to another depending from that number value.
Ah, dammit, there are those stupid mistakes in the dialog compiler, where it cannot handle multiple dialog "return" or "goto-dialog" statements in a option even if they are under different "ifs", and also it does not support a variable dialog number in "goto-dialog" apparently.
The solution is explained in this section of the manual:
https://adventuregamestudio.github.io/ags-manual/DialogScript.html#using-regular-scripting-commands-in-dialogs
It is to instead use "real" script "return" command, the one with indentation. It must be followed by either a dialog's number if you want to go to that dialog, or one of the special constants:
return dSomeDialog.ID;
return RUN_DIALOG_GOTO_PREVIOUS;
return RUN_DIALOG_RETURN;
return RUN_DIALOG_STOP_DIALOG;
So in your case it would be, for example:
@S // Dialog startup entry point
player.Walk(cLei.x - 26, cLei.y, 1);
player.FaceDirection(eDirectionDownRight);
if(!diagLei) return dLeiInizio1.ID;
return
Thank you
@Crimson Wizard . Anyway, this thing of dDialog.ID isn't explained, I guess.
I am going to convert any dDialog.Start() with reurn dDialog.ID and see if it works.
Quote from: Giacomo on Mon 28/10/2024 11:06:29Anyway, this thing of dDialog.ID isn't explained, I guess.
Yes, it's not explained, the manual has a lot of missing things.
Hi, just a little question.
If i do this on dMainDialog:
Spoiler
@S // Dialog startup entry point
if(!haveTalkedTo) return dAnotherDialog.ID;
return
Then, inside dAnotherDialog:
Spoiler
@S // Dialog startup entry point
haveTalkedTo = true;
return
@1
dAnotherDialog.SetOptionState(1, eOptionOffForever); //both lines are present in every option
if(dAnotherDialog.OptionCount == 0) return dMainDialog.ID;
return
The control goes back to the player and I can't see dMainDialog again.
But if i do this on dMainDIalog:
Spoiler
@S // Dialog startup entry point
if(!haveTalkedTo) dAnotherDialog.Start();
return
Then inside dAnotherDialog, keeping the same functions as before, when every option is set off I can go back to dMainDialog. I tested both on windows and web and I see no exception thrown.
So, it seems to be working but I wonder if the two nested dialogues are both closed, once from dAnotherDialogue I go back to dMainDialog and then close the conversation. Do you think it is OK to do so?
Quote from: Giacomo on Wed 30/10/2024 11:19:18Then, inside dAnotherDialog:
Spoiler
@S // Dialog startup entry point
haveTalkedTo = true;
return
@1
dAnotherDialog.SetOptionState(1, eOptionOffForever); //both lines are present in every option
if(dAnotherDialog.OptionCount == 0) return dMainDialog.ID;
return
The control goes back to the player and I can't see dMainDialog again.
Your condition here is probably wrong. OptionCount returns the number of
total options in a dialog, not number of active options. Since you have 1 (or more?) option in dAnotherDialog, then this condition will always return false.
You need to fix your condition, probably make a custom function that calculates number of active options.
Right, the function is useless and removing it is enough to make it work, as once no option is available, the control returns to the previous dialogue.
Still I wonder if it's ok in this case to use dAnotherDialog.Start().
Quote from: Giacomo on Wed 30/10/2024 12:23:31Still I wonder if it's ok in this case to use dAnotherDialog.Start().
This is your game, so it's your decision. Personally, I would not use a function that is known to work incorrectly inside a dialog script, even if it happens to achieve result in this case. And I do not see any real
reason to use this function, since there's another variant that works correctly.
Sure, thank you Crimson and all users for your help!
This seems to work, I hope it can be useful for other users.
bool _checkAvailableOptions(Dialog* myDialog)
{
for(int i = 1; i <= myDialog.OptionCount; i++)
{
if(myDialog.GetOptionState(i) == true) return true;
}
return false;
}
Quote from: Giacomo on Wed 30/10/2024 14:27:40 if(myDialog.GetOptionState(i) == true) return true;
I'm sorry, but this is not accurate, although might work by coincidence. GetOptionState does not return a boolean, it returns enum:
https://adventuregamestudio.github.io/ags-manual/Dialog.html#dialoggetoptionstate
The correct way of checking would be
if(myDialog.GetOptionState(i) == eOptionOn) return true;