How to refresh an actors stats?

I can't figure out how to use a script call to refresh an actors stats for the menu screen.
I thought it would be something along the lines of:


$gameActors.actor(1).refresh();


But that doesnt seem to help my issue. Anyone know what I can use to refresh a characters stats (hp/mp/other stats)?
 
I feel like what you have in the script call should work.  We might need a little more info to figure this out.  What is the exact circumstance that you're refreshing for?
What exactly do you want to "refresh"? There are several different ways how that name is used in programming, and most likely you simply got the wrong function.


I've moved this thread to Javascript Support. Please be sure to post your threads in the correct forum next time. Thank you.
To summarize without overwhelming with details as to what I'm attempting to do:
I'm working on an event that basically allows your character to reset their stats (HP, MP, Atk, Def, etc.) back to their default values, as there is a player controlled stat distribution mechanic.

I've got it all working basically how I want it upon the reset. This is a condensed version of the code I'm inputting via script command:
 


[2101,2102,2103,2104].forEach(function(id) { $gameActors.actor(1).forgetSkill(id) } );
$gameActors.actor(1).refresh();


However, some of the skills the actor learns/unlearns affects the actors stats. After this event/code is run, I can enter the menu but the character still visually displays the old HP/MP from before the code is run. However, when I enter the skill screen, the actors information display corrects/refreshes itself. I'm trying to resolve the issue of this information not displaying upon first entering the menu screen.
Wow, welp I just found my culprit.
I had called the refresh above some other code I had input. Sorry for the trouble and thanks for the assistance!


/facepalm

Original thread: https://forums.rpgmakerweb.com/threads/how-to-refresh-an-actors-stats.73526/