Menu Error

Hello! I've been working on my game project for a while now and have been neglecting the menus. I discovered that my game will crash whenever I finish an event where I pick up a doll and add it to the inventory. The game says it is failing to load a file in order to load the menu, but it just doesn't make sense since it wants a file from the characters images that has long since been deleted.
Whenever I reload the map (by leaving and coming back), or before I initiate the event where I pick up the doll, this problem doesn't happen or solves itself. It's very strange. :kaolivid:
Is there a script call I can use to reload the map very quickly without the player noticing? I'm not sure how else to solve this mysterious problem. 😐

Attached is the error code I receive when my game crashes.
A few things.

- When you're asking for help with an error, you need to press F8, go to the Console tab, and post a screenshot of the full error trace.

- You should fix your filenames. MZ is a Web-based game, and you can get errors loading files that contain characters that aren't HTML-compliant. None of your folders or files should have spaces in them, or the deployed game may crash on some players' computers.

- Did you start a new play test since removing whatever it is that used that filename? The most common cause of an error like this is trying to use a saved game after making changes to your project.
A few things.

- When you're asking for help with an error, you need to press F8, go to the Console tab, and post a screenshot of the full error trace.

- You should fix your filenames. MZ is a Web-based game, and you can get errors loading files that contain characters that aren't HTML-compliant. None of your folders or files should have spaces in them, or the deployed game may crash on some players' computers.

- Did you start a new play test since removing whatever it is that used that filename? The most common cause of an error like this is trying to use a saved game after making changes to your project.
I am using something called DevTools, I think it came with one of the Yanfly plugins.

I didn't realize having spaces in my file names was a bad thing 😢

That filename has not been in my game for a long time. The menu will load fine any other time so far. I'm also not trying to use a saved game either. I'm not too sure what to do.

Anyways attached is the full error trace from DevTools. I don't know how to use DevTools either honestly...
Well, something is still trying to load that image - it's in your game someplace, whether it's an event image, in a notetag, something.

You could search for the filename in your data folder, seeing which file it's in could help narrow it down.
That filename has not been in my game for a long time. The menu will load fine any other time so far. I'm also not trying to use a saved game either. I'm not too sure what to do.
So you're saying you had and were using that file but have since deleted?

Kind of sounds like whatever it is/ was connected to is still being given or called in that area of your game. So either put the file back or delete whatever is calling that image.

Ninja'd by turan
Well, something is still trying to load that image - it's in your game someplace, whether it's an event image, in a notetag, something.

You could search for the filename in your data folder, seeing which file it's in could help narrow it down.
I looked up the image name in my game folder, and it turns out to be a sprite sheet that I use to animate a drawer opening. I'm not sure why the game wouldn't be able to load this file when it loads it just fine for animations.

Also though, when the map is reloaded, this problem just goes away. So I mean if there is a way to just reload the map super quick at the end of the event where I pick up the item, then problem sorta solved.

I can test to see if this happens with just this one event or if it happens if I have items being picked up during any other events. Or I'm thinking just have the item being picked up happen in it's own separate event might dodge this issue too.

I fixed the problem! The image was being called in a movement route command which was causing the error! Everything works fine once that part was deleted 😂 Hooray!
This thread is closed due to being indicated as solved. If you need it reopened, let us know. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/menu-error.168966/