Quantcast
WoWInterface - View Single Post - SavedVariables not writing table
View Single Post
12-06-20, 09:47 PM   #6
myrroddin
A Pyroguard Emberseer
 
myrroddin's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 1,176
There is almost never any reason to expressly register and use PLAYER_LOGOUT to write your saved variables, as the game automatically writes SVs to disc during that event, meaning you don't have to do it.

The only reason I can think where someone might do it is if they use local references to longer SV tables and want to re-map the SVs to the local references. Usually nobody does this as it makes debugging a lot more difficult.

You can also use PLAYER_LOGIN to create or verify your SV table instead of ADDON_LOADED, mostly because PL only ever fires once and you don't have to parse the results until your addon is found.
  Reply With Quote