View Single Post
08/12/14, 06:25 AM   #19
zgrssd
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 280
Originally Posted by Randactyl View Post
I've seen this mentioned a couple of times. How does one avoid ZO_SavedVars in the first place?
All the manifest line "SavedVariable" says is:
Define a global variable of that name
Automatically write it to disk on UI unload/read it in from disk on UI load. The loading is finished just before the first OnLoaded Event is fired.

All ZO_SavedVars does is help you with structuring the data by account, character, namespaces, etc. It also provides built in versioning system (perhaps the most usefull part).
You can just as well treat it like any other table with subtables and write it directly. That way you avoid issues (the way ZO_SavedVars get's the account name is hardcoded wich lead to the issues between 1.2.3 and 1.3.3).

I started work on a really small library taht should deal with the main plumbing issues for you, as long as you tell it wich global variable to write too it takes care of the rest. Not yet finished, however.

Last edited by zgrssd : 08/12/14 at 06:27 AM.
  Reply With Quote