Weird issue when saving: “function not found: “ ”

HuMann
06 Feb 2022, 15:27

Hi, I am working on a quest project which has run into a very weird issue that allows the game to run, but prevents saving. Whenever you try to save, you get an error that just says this:

function not found: “

personally id prefer if quest told me what function was missing, so I could maybe fix it, but oh well.

Does anyone have any idea what could be causing this?


mrangel
06 Feb 2022, 20:07

When playing a game, it only checks the validity of code when it is run; or when the game is saved.

The functions to turn the in-memory data back into XML may stumble over something that the 'load' function missed. Although I think that in most cases the editor's save function would have the same problem (or would trash the relevant line of code, leaving garbage when it was reloaded). I suspect it may be worth checking if there is a problem with any of the libraries you are using; generally, library files are inserted verbatim into the game when it is published, and their XML is only checked to quite a shallow level, allowing errors to slip through.

I'm not sure what else to suggest; but if you have any libraries included it would be good to look at them. (I believe there was at one point a similar issue with one of the core libraries – an error in one of the language libraries made a game unable to be saved)


HuMann
07 Feb 2022, 18:34

i dont think it has anything to do with libraries, because a previous version of the game is able to save, and I never touched any libraries in that time, but I might as well try. How would I go about checking if theres an error in a library?


mrangel
08 Feb 2022, 00:44

You could try making copies of the game, and deleting chunks of the game (a selection of rooms, perhaps) and testing it. Obviously this might break the logic of your game; but if it now allows you to save, you would know that the error is somewhere in one of those objects. So start with a new copy, and delete a smaller selection until you find where the error is occuring. If it still doesn't work, replace those parts and delete a different bit. It usually doesn't take too long to narrow down where a problem lies.

Do you have an old version of the game to compare with? If so, it might be worth searching for changes, and starting with those parts.