MZ Common Event Not Being Run in Command List for Main Menu

Hello!

I've been trying to use VisuStella's MainMenuCore for RPGMZ to add another menu option that runs a common event when clicked. Every time I try to use the new menu option I made, the game seems to just freeze and am unable to navigate out of the menu. The common event is not ran, so I'm imagining that this is a JS coding issue from my end, how do I fix this? (For context, I unfortunately know zero JS or how to code in general)
1729468187683.png
1729468196845.png
I'm not wholly familiar with MZ or what exactly you are trying to do, but I think reserve might not be the most appropriate script call.
As stated here in the MV/MZ script call list:
MV can only reserve one common event at a time.
Only the most recent reservation will be retained.

MZ runs reserved events in the order they were queued.

The reservation queue is not included when the player saves the game: be careful about queuing events on scenes with no interpreter (e.g. menu).

You can try:
interpreter.command117([commonEventId]);
Though the result may be the same.

It may also help to see the common event regardless. So please share a screenshot of that as well.
I'm not wholly familiar with MZ or what exactly you are trying to do, but I think reserve might not be the most appropriate script call.
As stated here in the MV/MZ script call list:


You can try:
interpreter.command117([commonEventId]);
Though the result may be the same.

It may also help to see the common event regardless. So please share a screenshot of that as well.
I tried using the code but instead of it being frozen, i got a ReferenceError that said "interpreter is not defined".

Also here's my screenshot of the common event. Basically, it's supposed to be a menu option that gives the player descriptions of characters they've interacted with based on their "friendship level" with them. The process was long-winded and the content is repetitive; sorry for not being able to send everything, so here are screenshots of the first and last pages.
1729485845068.png
1729485850724.png
You can try:
interpreter.command117([commonEventId]);
It's the same idea - the menu does not have an interpreter to run common events. They don't work in the menu.

@Dynameou I don't know what in your setup is causing the game to freeze rather than do nothing and run the common event when you leave the menu, but it's not going to create a nice effect like you select the command and it closes the menu and starts the event.

You could try putting SceneManager.goto(Scene_Map); $gameTemp.reserveCommonEvent(20) but I haven't tried it.
Yeah, there's no interpreter in menu. But that is not the problem, you can always new one Game_Interpreter and run it. Like:
JavaScript:
var ii = new Game_Interpreter();ii.setup($dataCommonEvents[20].list);ii.update();
The real problem is, you can't just use any commands in the menu scene because most of them are designed for map and battle. And since there's no function that updates the interpreter it can only be used to do one-frame jobs.
Those that change variables, equipments, etc, should be OK, but something involving animation, message, map transfer, most likely will have problems.

You'll need to make a plugin if you want do something more advanced.
It's the same idea - the menu does not have an interpreter to run common events. They don't work in the menu.

@Dynameou I don't know what in your setup is causing the game to freeze rather than do nothing and run the common event when you leave the menu, but it's not going to create a nice effect like you select the command and it closes the menu and starts the event.

You could try putting SceneManager.goto(Scene_Map); $gameTemp.reserveCommonEvent(20) but I haven't tried it.
Yes this worked, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/common-event-not-being-run-in-command-list-for-main-menu.172725/