Closed warestarstuff closed 5 years ago
That's strange. I do not get this error, and I can't see how it would occur in the code either...
Last time I checked there were no errors when decompiking Deltarune. Did you change anything in the script? What version are you on?
alright, for some reason i didn't even mention this thanks to me just waking up, its a modified "scr_monstersetup" file. Not heavily modified mind you- the only things changed are some HP values and some ATK things. However, this doesn't mean there isn't an issue, as I remember it used to display stuff in the decompiler before. Also the file doesn't bring up any weird issues in the actual game, everything works as I intended it to work.
Heres the code in the disassembly, by the way: https://pastebin.com/4BzCdktj
Sorry for the initial confusion in the original post.
edit: using the latest version of the mod tool, it used to work before the big decompiler update i believe, but dont take my word on it
You probably made an error somewhere in your modified script then. It's possible that the game still works since the runner does not check for every possible error for performance reasons, or the code path the error is in just never got triggered.
Also, either you didn't copy the whole disassembly or the script is broken because it ends on some push instructions without matching pop
a tad odd, i did copy the whole thing i believe, i checked. i loaded my data.win from an earlier version of the undertalemodtool, and it didnt generate an error however
https://i.imgur.com/UbmfC6T.png
also at the bottom of the script is some extra code https://i.imgur.com/pkQQMHG.png so i suppose you are correct about push not matching pop, but the fact is that this version of the mod tool still displays it, strangely enough... ill mess with it a bit and see what happens
managed to fix the issue, the error is no longer showing up. turns out it wasnt the tool's fault, which is pretty cool. For some reason on lines 5490 and such, it had "bf 06077" instead of "bf func_end". Why? Who knows. Anyway, it works great now! Thanks for the help.
func_end is an alias for "last line + 1", where GMS always adds an implicit ret instruction. This means that these weird instructions at the end must have been added in some strange way that didn't update the jumps. No idea how that happened, but glad you got it sorted out.
Going into deltarune's "scr_monstersetup" file and looking at the decompiled tab will get this error:
Should possibly be noted I am running the program as an administrator.