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:
SimpleXPBar.esoAccount[GetUnitName("player")] = ZO_DeepTableCopy(SimpleXPBar.esoAccount["$AccountWide"] or {})
-- Now we have a fresh copy to be used here:
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...