My fix suggestion still stands and I honestly think more developers should switch to it.
I save everything to the variable declared in each addon's manifest. And I still filter by version number and character name. I do nothing at all with account names, because that's basically pointless.
if manifestGlobalVarName == nil then manifestGlobalVarName = {} end
if manifestGlobalVarName[<versionNum>] == nil then manifestGlobalVarName[<versionNum>] = {} end
<youraddon>.GlobalSettings = manifestGlobalVarName[<versionNum>]["GLOBAL"]
<youraddon>.Settings = manifestGlobalVarName[<versionNum>][<characterName>]
<load your defaults if need be>
<make sure to gsub() the ^ characters off the end of the character name>
Done. I then save/load things in and out of GlobalSettings or Settings as appropriate. Works like a charm. Not a single addon using this method has had a saved variable problem since they switched to this system months ago (some switched more recently).
|