Okay,
I have set up my Saved Variables table as follows:
Lua Code:
local function InitSavedVariables(...)
SVData = ZO_SavedVars:NewAccountWide(addonSV, 1, "Data", SVDefault)
SVDataIndex = 1
end
It then gets written to as follows:
Lua Code:
SVData = SVData or {}
SVData[zone] = SVData[zone] or {}
SVData[zone][name] = SVData[zone][name] or {}
SVDataIndex = #SVData[zone][name] + 1
SVData[zone][name][SVDataIndex] = SVData[zone][name][SVDataIndex] or {}
SVData[zone][name][SVDataIndex]["Action"] = action
SVData[zone][name][SVDataIndex]["X"] = xPos
SVData[zone][name][SVDataIndex]["Y"] = yPos
SVData[zone][name][SVDataIndex]["Date"] = dateValue
SVData[zone][name][SVDataIndex]["Time"] = timeValue
But when I try and traverse the table as follows:
Lua Code:
local function RecurseSavedVariables(...)
-- Zone
for i,v in pairs(SVData) do
ChatMsg:AddMessage(string.format("(i,v) - %s : %s (%s)",tostring(i),tostring(v),type(v)))
if ( type(v) == "table" ) then
-- Name
for i2,v2 in pairs(v) do
ChatMsg:AddMessage(string.format("(i2,v2) - %s : %s (%s)",tostring(i2),tostring(v2),type(v2)))
if (type(v2) == "table") then
-- Values
for i3,v3 in pairs(v2) do
ChatMsg:AddMessage(string.format("(i3,v3) - %s : %s (%s)",tostring(i3),tostring(v3),type(v3)))
end
end
end
end
end
end
It seems to think it has the following data in there:
GetInterfaceForCharacter : function : xxxxxxxx : (function)
default : table : xxxxxxxx : (table)
and despite having a table in there it doesn't traverse it further as expected, to see what else is hiding there.
Is there a special way to traverse the Saved Variables table in ESO ?