View Single Post
01-14-18, 08:07 AM   #20
Ammako
A Frostmaul Preserver
AddOn Author - Click to view addons
Join Date: Jun 2016
Posts: 256
Originally Posted by aallkkaa View Post
You can set the flag to work reversely. I.e.:
1. Check the saved flag, say "cleanExit", and do the necessary fixups if it's false or nil;
2. Set cleanExit to false upon PLAYER_LOGIN;
3. Change the CVars and whatnot;
4. Set cleanExit to true on PLAYER_LOGOUT.
The absence of write on game crash implies NO evidence of a clean exit.
Game crash = no disk write, including step 2.

You could have that variable set to true at login, change it to false at step 2. Game crashes, the change isn't saved, and it will still be set to true.

Saved Variables don't get written to until you reload/logout/exit the game, no matter how many changes you make.

Last edited by Ammako : 01-14-18 at 08:10 AM.
  Reply With Quote