SavedVariables not writing table
View Single Post
12-06-20, 09:47 PM
A Pyroguard Emberseer
Join Date: Oct 2008
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.
View Public Profile
Send a private message to myrroddin
Visit myrroddin's homepage!
Find More Posts by myrroddin