Undefined is not a Function VE_Scripts

So, I've been trying to make a Final Fantasy 1 styled Magic system, where you only have a limited number of spells per "day", and this https://victorenginescripts.wordpress.com/rpg-maker-mv/mp-levels/ has been the closest I could find for my goal. However, the growth functions were not working, so I decided that instead of it being base on level ups, why not find a special currency around the world that can solely be spent to buy items to increase those levels. The moment I used the item in game, it crashed and game me: Type Error: Undefined is not a function.
I get this error even if it and it's dependency mod is installed. Judging from my limited skill in JS, it looks like it's conflicting with a base script in rpg_scenes.

I don't know what else to really say. It did this on my main game, and also on my testing game.
What "item" did you use in the game that caused it to crash? Show us how you have that set up.

Also, did you add this plugin and then continue a game that you'd previously saved? That is a common cause of the 'undefined' errors.
What "item" did you use in the game that caused it to crash? Show us how you have that set up.

Also, did you add this plugin and then continue a game that you'd previously saved? That is a common cause of the 'undefined' errors.
I just started making the game, so that is the answer to your second question. As to the first question, I just made a item and used the note tags provided by the plug in to make it where it would level up my MP. Item attached.
It's also likely you have your plugins installed in the wrong order, or that another plugin is somehow interfering. Can we see your plugin manager?

I've never seen anything try to call a function by Game_Actor.Game_BattlerBase before...that looks highly suspicious...but I can't see anything wrong with the plugin itself, which is why I suspect interference.
It's also likely you have your plugins installed in the wrong order, or that another plugin is somehow interfering. Can we see your plugin manager?

I've never seen anything try to call a function by Game_Actor.Game_BattlerBase before...that looks highly suspicious...but I can't see anything wrong with the plugin itself, which is why I suspect interference.
I made a new project file to test them, the only plug ins I have are VE_Basic module (Required) and VE_MP Levels. The screenshots I posted are from that new game project
Do you have VE_Basic module above VE_MP levels in your plugin list?
Do you have VE_Basic module above VE_MP levels in your plugin list?
Yes. You made me doubt myself and I had to go check XD
What version of MV are you running, and what is the version of your core.js file (in the js folders, check core.js and there should be a version number on the first couple of lines - if it's not there, it means you have 1.0.0)

Also, what is on line 459 of your VE_MPLevels.js file? The one you linked to doesn't seem it would throw that error on that line, so I'm wondering if you've made any mods or inserted/removed any lines.
What version of MV are you running, and what is the version of your core.js file (in the js folders, check core.js and there should be a version number on the first couple of lines - if it's not there, it means you have 1.0.0)

Also, what is on line 459 of your VE_MPLevels.js file? The one you linked to doesn't seem it would throw that error on that line, so I'm wondering if you've made any mods or inserted/removed any lines.
Version 1.5.1.
Line 459 is as follows.
mpLevel[level].now = now.clamp(0, max);
Game_Actor implies Game_BattlerBase.
Game_BattlerBase is not a function of Game_Actor..... so Game_BattlerBase respect of Game_Actor, is undefined.
that's the error.

I believe the error comes from another script, probably a required script by VE, that rewires the original functions to VE functions.

I can't find that particular call in ve_mplevels.js
I assume that means that the plug in is broken, is there a way I can fix it, the developer appears to have vanished off the face of the earth.

EDIT: If no, I will accept my fate and just use a more DND styled spell system from Yanfly.
What version of MV are you running, and what is the version of your core.js file
Version 1.5.1.

That was two questions. You only answered one, and the least important one.
That was two questions. You only answered one, and the least important one.
Oh sorry, they both said 1.5.1, I should've specified that.
correction:
Code:
mpLevel[level].now = now.clamp(0, max);

.clamp(0, max) seems to be what's undefined, not the other thing I mentioned.
which, is still weird, and shouldn't be written that way, but doesn't seem to be the problem the error refers to.
if that is not a javascript instruction, then it must be a function defined in another script.
that's why it's "undefined".
I'm getting errors that it cannot read property "now" of undefined; mpLevels[level] is undefined; since that's the case, attempting to run a clamp operation would indeed result in an undefined is not a function error.

I believe this is due to Game_BattlerBase._mpLevelValues not being initialized properly; however, I'm too tired at the moment to try to figure out the solution. If no one else can solve this by tomorrow, I'll have another look at it.

Edit: meant to say mpLevels[level] is an empty object, making mpLevels[level].now undefined
Gonna guess from the silence that there is nothing I can do.
Gonna guess from the silence that there is nothing I can do.
no, it means that the experts have their own live as well and can't always answer within minutes.
Our rules say "no bumping unless 72 hours have passed" exactly for this reason.

Don't give up, check the state of this topic again tomorrow and the day after.
Sometimes it takes weeks to pinpoint an error.
@Andar, thank you. Yes, my husband got his first day off in 8 days, so I chose to spend my time yesterday enjoying his presence at home and with my family, rather than tracking down bugs in plugins for free.

@shadowscale1229 I've narrowed down the problem; the plugin is not correctly evaluating the mp level gain notetag. It's adding a string to the mp value rather than just the result as a number. Since clamp is a function of a number, not a string, it generates the "undefined is not a function" error.

This plugin has quite a few...er..."quirks"... You MUST set up each actor's max MP level. You MUST set up each actor's MP level growth for each level. If you fail to do this, you will either end up with errors or a seemingly inexplicable 0 max MP for a given level.

Under the heading "Victor Engine" toward the very end, just before the heading "Game_Action", you will need to change the following lines:

The last line for VictorEngine.MPLevels.processValues4 becomes:
Code:
data.MPLevels[level].growth = eval(String(match[3]).trim());

The last line for VictorEngine.MPLevels.processValues5 becomes:
Code:
data.MPLevels[level].gain = eval(String(match[2]).trim());

Please let me know if there are any questions as to implementing the fix, or if for some reason it doesn't work. Please make sure you pay attention to the note I listed in bold above before reporting further issues. 🙂
The last line for VictorEngine.MPLevels.processValues4 becomes:
Code:
data.MPLevels[level].growth = eval(String(match[3]).trim());
The last line for VictorEngine.MPLevels.processValues5 becomes:
Code:
data.MPLevels[level].gain = eval(String(match[2]).trim());
First off, I'd like to apologize for being impatient, thank you for taking time to help me.
Now, I went into VE_MPLevels and changed those lines, but now when I try to test my game, it starts up with "a is not defined". The only other thing I did was change the version number in the description to 1.00.01, to signify to myself that this was the fixed one. I've attached the console and the lines I changed.
did you start a new game?

Original thread: https://forums.rpgmakerweb.com/threads/undefined-is-not-a-function-ve_scripts.90229/