HELP! A variable that adds a point everytime a character levels up?

I want to make a variable that, everytime a character levels up, will add a number.

Ex:
*Vincent now is level 2!
*Variable checks Vincent's level is a number up, then adds one point.
*Variable: 1

*Vincent's now level 3!
*Variable checks Vincent's level is a number up, then adds one point.
*Variable: 2

The point of this is to create a common event where the player can spend said points (the variable ones) in a "stat bonus shop". So if the character has 2 points, they can spend them on stats to increase them by the amount of points they spend.

Sorry if the english is messy!
That's quite easy to achieve even without that variable.

This is the formula you need to use:

$game_variables[VarID] = $game_actors[ActorID].level - 1

...or the corresponding event command.

Use another variable to keep track of all the points the actor has spent so far, and that's it.
you don't even need to track that.

just store the number of points the actor has already spend when leaving the shop event.
and when calling it again, use control variable : game dada : actor _ level
to get the current level and substract the variable tracking the spend point from it.
That depends on what he does right when the actor levels up. Using the first variable to store the level allows the game dev to display a message like "Congratulations! You have reached Level \v[1]!" before entering the shop.
That's quite easy to achieve even without that variable.

This is the formula you need to use:

$game_variables[VarID] = $game_actors[ActorID].level - 1

...or the corresponding event command.

Use another variable to keep track of all the points the actor has spent so far, and that's it.
It worked very good. Thank you both!

Original thread: https://forums.rpgmakerweb.com/threads/help-a-variable-that-adds-a-point-everytime-a-character-levels-up.174954/