You're creating myOptionsTable when your .lua file is loaded which is before the system has loaded your saved variables:
- game reads your .lua file does what it needs at that stage (in this case including creating your table)
- game then loads your saved variables.
Given you're initialising AceConfig :RegisterOptionsTable in the kickoff function called by AMine:OnEnable() (which Ace handles in an event), you could move the table above the kickoff () function and wrap it in a function of it's own (if you want to keep the separation) and call that during registration, ending up with something like:
Lua Code:
local function initConfigSettings()
local myOptionsTable = {
...
}
return myOptionsTable
end
function kickoff()
AMine.db = LibStub("AceDB-3.0"):New("AMineDB", defaults)
AMine.profileOptions = LibStub("AceDBOptions-3.0"):GetOptionsTable(AMine.db);
LibStub("AceConfig-3.0"):RegisterOptionsTable("Profiles", AMine.profileOptions);
local options = initConfigSettings()
LibStub("AceConfig-3.0"):RegisterOptionsTable(THISAP, options);
AMine.myOptions = LibStub("AceDBOptions-3.0"):GetOptionsTable(options);
AMine.myOptions = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(THISAP, nil, nil)
AMine.myOptions.buh = LibStub("AceConfigDialog-3.0"):AddToBlizOptions(THISAP, "buh", THISAP, "spellsels");
AMine.profilesFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Profiles", "Profiles", THISAP);
end
or you could create the table inside the kickoff function before registering it.