Help With LTN Stats Plugin

I had this working before when I first tried it out ages ago, when I first downloaded it. Now I wanted to actually use it, I can't get it to work.

JavaScript:
var actorId = 1;
var newCharismaLevel = 3;

$gameActors.actor(actorId).customStats["CHA"].currentLevel = newCharismaLevel;

This is the code I am using. I wanted to have a check in a dialogue for the charisma stat, so with this script above I wanted to check it worked. I have this set to activate on player touch of an event.

Here is the error.

1708245848004.png


Here I have defined the stat below.

1708245893055.png


I have also followed the instructions with the plugin to put a stat menu into the pause menu with VisuMZ Main Menu Core. Shows up, but when I click to get to the menu I get a similar error.

1708246269169.png

Original thread: https://forums.rpgmakerweb.com/threads/help-with-ltn-stats-plugin.165895/