Well 2 hrs or so later, finally got it figured... whew. Now I am happy and not the sulky bitch I was before rofl.
This is how I managed to access the saved variables in it's entirety. The local SVData file is only the contents of that session as it only works if you clear the tables when the addon is loaded, but the contents of XrysGatherer_SavedVariables is the whole data.
This means I may be able to go back to the old version and use this code anyway and not have to fix the data everyone has been gathered so far.
Unfortunately at 1:30am I doubt I'll be doing anything else this beta weekend except to test that the original version can traverse properly this way too and when I want to rather than only after it has been updated which is what it is currently doing and upload a working version of that.
Lua Code:
ChatMsg:AddMessage("Traversing Saved Variables")
harvestHistory = {}
for default,sv in safepairs(XrysGatherer_SavedVariables) do
for account,accountv in safepairs(sv) do
for accountWide,acWideV in safepairs(accountv) do
for history,historyV in safepairs(acWideV) do
if history == "History" then
table.insert(harvestHistory,historyV )
end
end
end
end
end
ChatMsg:AddMessage("Traversing Harvest History")
for historyIndex,historyData in safepairs(harvestHistory) do
for zoneIndex,zoneData in safepairs(historyData) do
if zoneIndex ~= "version" then
for itemIndex,itemData in safepairs(zoneData) do
for indexIndex,indexData in safepairs(itemData) do
ChatMsg:AddMessage(string.format("%s %s in %s at %0.3f,%0.3f",itemIndex,tostring(indexData["Action"]),zoneIndex,indexData["X"],indexData["Y"]))
end
end
end
end
end