Error in Yanfly JP Manager

So I installed the script, with Learn Skills Manager and set up a skill to be learned that will grant a small amount of jp upon each use. I then set up the enemy to give a certain amount of jp so I could get the initial skill.

Anyways, while testing in a fight, I discovered this error:

JP_error.jpg


Script is here
Looking at the script, it seems like it has something to do with the calculation of a character's JP rate as influenced by equipment.

Don't know any more than that... it could also be a conflict with another script you might be using.
I moved it to the bottom of the scripts, so as to make sure that it would override anything that might have been changed by other scripts, and still ran into the same problem.

And I assumed it was because a nil value was being entered as the equip jp rate. So, I set up my equips to give a 100% jp rate and still got the same error.

What I think the problem is, is that equip.nil returns a text value, which cannot be converted into a float. I don't understand what it returns though, so I may be wrong.
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


For jp_rate to be nil, the value would have to have not been set up in the first place, since the method that sets it up uses either a value of 1.0 or reads the regexp and converts the match into something that is always a numeric. Normally all objects jp_rate would be set up in DataManager.load_database. If another script overwrites load_database, this would be bypassed. You might also have a problem with any script that adds creates database objects (or instance items) after load_database has already been run. Since it doesn't crash when actor and class jp_rate are multiplied in two lines earlier, I am inclined to believe the latter.
Thank you! That tells me I'd have to combine those methods into one script so they wouldn't be overwritten.

Original thread: https://forums.rpgmakerweb.com/threads/error-in-yanfly-jp-manager.26272/