MV [YEP]Stat Allocation help!

How can I prevent the player from closing the stat allocation window until they have spent all of their points?
I think you just make a small modification to the cancel command (check below). But are you using the base formulas where the AP cost will increase the more you raise your stats? Then you can run into a situation where your actors still have AP points (like 1), but they can't use them, because everything costs 2 or more. Accounting for that needs extra code and I've no motivation to check how to do that.

Scene_StatAllocation.prototype.commandCancel = function() {
if ($gameParty.members().every(member => member.availableAp() === 0)){
this._actor.refresh();
this.popScene();
}
else {
SceneManager._scene._helpWindow.setText("Allocate all points for every actor.\nChange actors with Pg Up/Pg Dn");
this._commandWindow.activate();
}
};
Thank you so much... But i doubt it since player will eventually die much more than keep going
Yeah, but just to make sure you understood, I meant that in such a case the player would be locked into the stat allocation scene. If you want to make sure that can't happen, you'd either have to change in plugin settings for all increases to cost 1, or make the additional checks in the code.
Got it. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/yep-stat-allocation-help.178986/