Losing JP (Yanfly's JP Script)

So, I have Yanfly's Skill Learn System and the JP Script. I have some skills that my character can learn. I level up, get about 135 JP. I spent a bunch of points, had about 58 left and then went back to the map and got into a fight. I gained 5 JP from the fight. I go back into the menu and... all the JP I had is gone and replaced with only the 5 JP I just got from battle.


Does anyone know why this would happen?


EDIT: Another note. I am having the Player's stats raised by skills instead of levels. They spend JP to raise HP, MP, ATK, etc. I am using this code:


<Learn Cost Eval>


user._paramPlus[7] += 1;


user.forgetSkill(12);


user.refresh();


</Learn Cost Eval>


I don't know if this would have any effect on it? I just started a new game, raised a level, got JP, spent them, got into another fight, receive JP from the battle and lost all the JP I had left over (replaced by the JP I just got).

Original thread: https://forums.rpgmakerweb.com/threads/losing-jp-yanflys-jp-script.64113/