Start Multiple Account Support
His Dad [04-19-15 - 18:12]
Start Multiple Account Support
diff --git a/HistOffline.lua b/HistOffline.lua
index 99bcdd3..483be36 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -65,8 +65,13 @@ function write_saved(o)
end
end
-
-for i,_ in pairs(History_SV["Default"]) do -- Only one entry
+accounts = {}
+for i,_ in pairs(History_SV["Default"]) do
+ accounts[i] = {}
+ accounts[i].names = {}
+ accounts[i].leveling_box = {}
+ accounts[i].grp_box = {}
+ accounts[i].vet_box = {}
myaccount = i
end
@@ -81,10 +86,6 @@ end
-- Load User Data
-for i,_ in pairs(History_SV["Default"]) do -- Only one entry
- myaccount = i
-end
-
local allchar = History_SV["Default"][myaccount]["$AccountWide"]["data"]
--get all character names into an array
@@ -360,7 +361,8 @@ end
-- Now create the Log panel
-local logtable =iup.matrix{numcol=1, numcol_visible=1, numlin=0}
+local logtable = {}
+ logtable=iup.matrix{numcol=1, numcol_visible=1, numlin=0}
logtable:setcell(0,0, L.TStamp)
iup.SetAttribute(logtable, "ALIGNMENT0", "ACENTER")
iup.SetAttribute(logtable, "WIDTH0", 80)
diff --git a/history.lua b/history.lua
index aab7ff2..b2aadef 100644
--- a/history.lua
+++ b/history.lua
@@ -1,5 +1,5 @@
hist = {
- name = "History",
+ name = "history",
version = 2,
initialised = false,
SV={},