Yanfly's Equip Battle Skills: functions not working

I can equip skills normally but none of the javascript functions added by the plugin seem to work. To test I made a fresh project with a fresh download of the plugin and no other plugins active. I created an event which runs the following script when triggered:

Code:
console.log($dataActors[1].name);
console.log($dataActors[1]._battleSkillMaxPlus);
console.log($dataActors[1].getBattleSkillMaxPlus());

The last line causes a crash:

functionProblem.PNG


I get similar results with other plugin functions. Any ideas?

EDIT: Crap, I thought I was in the javascript support forum. Sorry. Requesting the topic be moved to Javascript / Plugin Support.
Could it be that you already call the Max Battle skills? Since line 2 and line 3 are more or less the same thing, it's just line 2 is the direct parameter while line 3 is the function?
No, that doesn't matter. Neither line actually changes the data being referred to.

And I'm not surprised that the second line doesn't work in a script call; I was mostly just showing off the variable name for anyone who wanted to look at the code. It SHOULD work in my plugin code, though, and it doesn't seem to. And the third line should work either way.
Moved to: Plugin Support

The most common reason for yanfly's plugins not to work is if you placed them in the wrong order - they have to be exactly in the order given in yanfly's plugin list or there is a good chance they won't work.

The second most common reason is incompatibility with another plugin.

Both can be checked if you post screenshots of your plugin manager.
As I said, I'm testing this with a fresh project with no other plugins running. AFAIK, nothing should stop the third line in that event from working.

Also, thanks for moving the thread. If you want to delete the reposted copy before anyone responds to it, please feel free. It's this one: https://forums.rpgmakerweb.com/inde...ip-battle-skills-functions-not-working.80189/
Finally got back to working on this and I found one problem - I shouldn't have had parenthesis on that function call. Changing the event's script call to this:

Code:
console.log($dataActors[1].name);
console.log($dataActors[1]._battleSkillMaxPlus);
console.log($dataActors[1].getBattleSkillMaxPlus);

...Prevents the crash. But the game still thinks that the variable is undefined:

functionProblem2.PNG


...Which doesn't really make sense, because the EBS plugin explicitly makes sure it's defined before returning a value:

Code:
Game_Actor.prototype.clearBattleSkillMaxPlus = function() {
    this._battleSkillMaxPlus = 0;
};

Game_Actor.prototype.getBattleSkillMaxPlus = function() {
    if (this._battleSkillMaxPlus === undefined) {
      this.clearBattleSkillMaxPlus();
    }
    return this._battleSkillMaxPlus;
};

At worst I should get a result of 0. Does this help anybody see the problem?

EDIT: Hang on, I must be out of it. Javascript thinks I just declared a new variable in the third line rather than calling a function, doesn't it? Sorry.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-equip-battle-skills-functions-not-working.80147/