View Single Post
01/27/16, 01:25 AM   #24
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Ah, I see. The ZO_SavedVars is not the raw table of the saved variable and contains metadata.

Next try is to access the raw tables:
Code:
local esoAccount = SimpleXPBar_Settings["Default"][GetDisplayName()]
SimpleXPBar.esoAccount = esoAccount
SimpleXPBar.rawCharSV = esoAccount[GetUnitName("player")]
SimpleXPBar.rawAWSV = esoAccount["$AccountWide"]
These tables can be nil.
Lua Code:
  1. SimpleXPBar.esoAccount[GetUnitName("player")] = ZO_DeepTableCopy(SimpleXPBar.esoAccount["$AccountWide"] or {})
  2. -- Now we have a fresh copy to be used here:
  3. SimpleXPBar.CharSV = ZO_SavedVars:New("SimpleXPBar_Settings", "1", nil, nil)
And of course the other way round.
Not as transparent to the internal structure, but...

Last edited by votan : 01/27/16 at 02:06 AM.
  Reply With Quote