kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
The Main Menu Manager plugin keeps throwing this error when I call the ESC menu. My js folder in this project is copy-pasted from Yanfly's sample project (so everything should be in the right order), I have no other plugins installed, and I haven't touched any of the code either (aside from some settings changes), so I have no idea why.

Disabling MMM gets rid of the error, but then the Stat Allocation and Quest Journal don't appear in the ESC menu, and my project kind of wants those.
 

Attachments

  • Thing 2.png
    Thing 2.png
    75.7 KB · Views: 19

Fornoreason1000

Black Sheep
Veteran
Joined
Mar 1, 2014
Messages
206
Reaction score
98
First Language
English
Primarily Uses
RMMV
okay based on that error, it sounds you've got a spelling mistake somewhere in the plugins settings. or your trying something that doesn't exsist.
can you provide a screenshot of the plugin settings and the plugin load order.
also can you tell me what ESC menu is?

'bind' is a special function that you use to delegate a functions 'this' property. this is usually very confusing to people who may not know how JS works. what that error is telling you is it can't find that property in ... whatever it is that you written for it.

here is basically what will cause that error

Code:
somethingThatDoesntExsist.bind(this) //error: cant find property 'bind' of undefined

var foo = undefined; //avoid this in practice
foo.bind(this) //same error again
foo = {};
foo.bind(this) //error: cant find proper 'bind' in object

var something = function(){};
something.bind(this); //no error
Window_Base.prototype.drawItem.bind(this); //no error

//this function doesn't actually exists
Window_MainMenu.prototype.commandChocoboRaces.bind(this) //Error: cant find property 'bind' of undefined
 
Last edited:

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
By ESC menu, I meant the main menu (which is by default called up with the ESC key, hence why I call it the ESC menu).

I went through the MMM settings and found that it was expecting the Music menu plugin, which I had turned off. Turned that back on, tried the Main Menu Manager, and while the game now calls up the main menu without throwing an error, it's behaving as if I have the Main Menu Manager plugin still turned off.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
38,400
Reaction score
10,835
First Language
German
Primarily Uses
RMMV
In 70% of all cases, "undefined" errors are caused by loading incompatible older savefiles. does the same error happen when you start a new game instead of continuing an old one?

If that is not the case, then the remaining 30% are incompatible plugins or wrong plugin order or wrong configuration or so, so in that case please give a screenshot of your plugin manager and tell us the core version of your project (open rpg_core.js with a text editor and read the title line for the version number)
 

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
There are no saves in this project, it's almost completely fresh.

According to its rpg_core.js, it's v1.6.1.

As for the plugin order and incompatible plugins...
My js folder in this project is copy-pasted from Yanfly's sample project (so everything should be in the right order), I have no other plugins installed, ...

Again, right now it's no longer throwing an error but it's behaving as if the Main Menu Manager plugin is off (even though I definitely have it on).
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
38,400
Reaction score
10,835
First Language
German
Primarily Uses
RMMV
the plugin order in the plugin manager has nothing to do with the js folder where you store the plugins. So copying the plugins from a sample project is NOT guaranteed to get everything right (quite the opposite, there are a lot of errors that could happen depending on what exactly you've done).

Please provide a screenshot of your plugin manager, because that is the ONLY way to check not only for plugin order but also for several other possible errors you could have made.
If you don't know how to make a screenshot with windows build-in methods simply ask for instructions.

But we need that screenshot or we can't help you.
 

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,186
First Language
English
Primarily Uses
RMMV
can you provide a screenshot of the plugin settings and the plugin load order.
@kirby5790 ^^ This is absolutely necessary, please provide it.

My guess is that one of the plugin settings is wrong, and Fornoreason1000 probably had the same guess which is why they asked to see the settings.

You can narrow down the cause with a bit of debugging. See the line of code from your screenshot that starts with "eval"? Open the plugin in a text editor and insert this line *before* the "eval" line.
Code:
console.log(i, symbol, bind);

To make sure you got it right, the whole function will look like this:
Code:
Scene_Menu.prototype.createCommandWindowBinds = function() {
  this._actorBinds = {};
  for (var i = 1; i <= 100; ++i) {
    var symbol = Yanfly.MMM.Symbol[i];
    if (symbol === '') continue;
    var bind = Yanfly.MMM.MainBind[i];
    if (bind === '') continue;
    console.log(i, symbol, bind);
    eval("this._commandWindow.setHandler('" + symbol + "', " + bind + ")");
    var actorBind = Yanfly.MMM.ActorBind[i];
    if (actorBind === '') continue;
    this._actorBinds[symbol] = actorBind;
  }
};

Then run the game again, when it crashes, take a screenshot of the console. There will be a list of the #, the symbol, and the bind - and the last thing in that list is the one that caused the crash.
 

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Well, all right, I just wanted to avoid posting Yanfly's entire library if I could... which wouldn't fit in the file size limit anyway, so here's everything that's turned on in the order I have it in.

The crashing stopped back when I turned Music Menu on, but now it's not acknowledging Main Menu Manager's existence. The console log is showing absolutely nothing.
 

Attachments

  • Thing 2.png
    Thing 2.png
    1.1 MB · Views: 8

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Sorry for double posting but I realized I forgot to add in MMM's current settings.
 

Attachments

  • Thing 2.png
    Thing 2.png
    206 KB · Views: 4

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,186
First Language
English
Primarily Uses
RMMV
1. That's definitely a lot of Yanfly plugins, so it can be difficult to make sure that they are in the correct order. Out of order plugins can cause a lot of issues, so this is really important. I wrote a tool that checks the order for you, it will be useful for you.

2. Can you do the console.log thing while forcing the game to crash (turn the music menu off)? I know we want to solve the crash, but this will help to limit the possibilities and identify the original cause of the crash.

After trying both of those things, we can work on figuring out why the MMM is doing nothing when you turn the music menu on.
 

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
The original error was in the first post, but here it is again.

I did rearrange some plugins according to your tool, but the exact same error is thrown.
 

Attachments

  • Thing 2.png
    Thing 2.png
    84.4 KB · Views: 2

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,186
First Language
English
Primarily Uses
RMMV
I saw the original error, but I was asking you to do the console.log thing to determine which of the plugin settings was causing it.

Here's the instructions again in case you missed it:
You can narrow down the cause with a bit of debugging. See the line of code from your screenshot that starts with "eval"? Open the plugin in a text editor and insert this line *before* the "eval" line.
Code:
console.log(i, symbol, bind);
To make sure you got it right, the whole function will look like this:
Code:
Scene_Menu.prototype.createCommandWindowBinds = function() {
   this._actorBinds = {};
   for (var i = 1; i <= 100; ++i) {
      var symbol = Yanfly.MMM.Symbol[i];
      if (symbol === '') continue;
      var bind = Yanfly.MMM.MainBind[i];
      if (bind === '') continue;
      console.log(i, symbol, bind);
      eval("this._commandWindow.setHandler('" + symbol + "', " + bind + ")");
      var actorBind = Yanfly.MMM.ActorBind[i];
      if (actorBind === '') continue;
      this._actorBinds[symbol] = actorBind;
   }
};
Then run the game again, when it crashes, take a screenshot of the console. There will be a list of the #, the symbol, and the bind - and the last thing in that list is the one that caused the crash.
 

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Turns out I had that line added to the wrong project, whoops.

I re-enabled Music Menu and here's the console log. No crash and Quest Journal appears in the menu (it occurred to me it might not show if I had it set to not show), but Stat Allocation still doesn't.

Disabling Music Menu stops the binds at musicMenu and crashes with the previous error.
 

Attachments

  • Thing 2.png
    Thing 2.png
    85.3 KB · Views: 7

Aloe Guvner

Walrus
Veteran
Joined
Sep 28, 2017
Messages
1,628
Reaction score
1,186
First Language
English
Primarily Uses
RMMV
Cool, it all makes sense.

If you disable the Music Menu plugin, then the function "commandMusicMenu" no longer exists. The Main Menu Manager tries to bind it, but it doesn't actually exist (can't bind an undefined thing, aka 'cannot read property bind of undefined').

If you disable the Music Menu plugin, you'll have to remove the corresponding settings from the Main Menu Manager (looks like #70 for you). Every time you disable the Music Manager, you have to remove the settings, every time you add the Music Manager back you'd have to re-do the settings again.

...Pretty annoying, right?
Fortunately, we can add error handling to fix this (why error handling isn't in the Main Menu Manager in the first place, I don't know). You can add the "try" and "catch" lines like this to the same function in your text editor:
Code:
Scene_Menu.prototype.createCommandWindowBinds = function() {
  this._actorBinds = {};
  for (var i = 1; i <= 100; ++i) {
    var symbol = Yanfly.MMM.Symbol[i];
    if (symbol === '') continue;
    var bind = Yanfly.MMM.MainBind[i];
    if (bind === '') continue;
    try {
        eval("this._commandWindow.setHandler('" + symbol + "', " + bind + ")");
    } catch (error) {
        console.error(error);
    }
    var actorBind = Yanfly.MMM.ActorBind[i];
    if (actorBind === '') continue;
    this._actorBinds[symbol] = actorBind;
  }
};

Now you say that the Quest Journal appears in the menu, and the Stat Allocation does not appear in the menu.

****
  • Can you give screenshots of the Main Menu Manager settings for the Quest Journal and the Stat Allocation?
****
 

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Here's Main Menu Manager's entry for the Stat Allocation plugin, but Quest Journal isn't anywhere in the settings.

Or did you mean the other way around (Quest/Allocation's Main Menu settings)?

Update: I added the Quest Journal to MMM's settings, then rechecked Stat Allocation and Quest Journal, and disabled "auto-add to the menu" on both. From what I can tell, it seems like MMM is being acknowledged now, but I'm still missing the Allocate option in the menu (though it is being bound in the log).
 

Attachments

  • Thing 2.png
    Thing 2.png
    50.2 KB · Views: 6
Last edited:

kirby5790

Villager
Member
Joined
Apr 25, 2013
Messages
9
Reaction score
1
First Language
English
Primarily Uses
Final update, I managed to get it working myself. Turns out Stat Allocation needed updating. It's always the simplest things that are the first overlooked. =P
 

Latest Threads

Latest Profile Posts

I've been working furiously on a small demo slice. But with King Slime so busy assets have been slow to form. No matter! I've got the demo for rpgmaker MZ and I'm using the 20 days to make a short and sweet demo game of fighting alongside your rival/boyfriend hehe Kind of like a mini challenge to myself
Yes my images are back ^^, hopefully they won't disappear again.:kaoangry:
It's Sunday. Stop working and take a break. Relax a little.
Ooops ended up trying out making my own A2 tile page instead of testing doors everywhere. Went well so far I think.
I guess I'm done making a blue squirrel's life difficult for posting new threads on different forums.
That's just for today so don't get used to this, squirrel-ish friend! :p

Forum statistics

Threads
131,487
Messages
1,220,225
Members
173,225
Latest member
ZecaVn
Top