11/29/14, 01:10 AM
|
#3
|
Join Date: Sep 2014
Posts: 120
|
Originally Posted by Garkin
Yes, it is exactly that easy as you say.
Just add some flag to the saved variables, so you can check if variables are updated already. Something like:
Lua Code:
local newDefaults = { internalVersion = 1, key1 = value1, ... } MYADDON.savedVariables = ZO_SavedVars:New(...) --here should be correct arguments to the function local currentVersion = MYADDON.savedVariables.internalVersion or 0 if currentVersion < newDefaults.internalVersion then for k, v in pairs(newDefaults) do MYADDON.savedVariables[k] = v end end
|
thank you very much
|
|
|