Ah, kinda makes sense.
But when do you initialise the nUI_Options ?
All my addons initialise the saved variables with the default values outside of the functions themselves and thus before the saved variables are loaded and replace these defaults. I've never had a problem like this with that data that way.
Say for example:
MyAddon.lua in wtf folder
SVData["Table1"] = {
Item1 = "SavedVariable"
};
MyAddon_SVData.lua
SVData["Table1"] = {};
SVData["Table1"].Item1 = "SomeTextHere";
etc
MyAddon.lua - loaded after MyAddon_SVData.lua is processed
function OnEvent()
Event = PlayerLogin
SVData["Table1"].Item1 would = "SomeTextHere"
Event = LoadVariables
SVData["Table1"].Item1 would = "SavedVariable"
end
This way the addon doesn't bomb out but will use the default values until the saved variables are loaded into memory. It's the way I have always dealt with saved variables and I have yet to have any of my data tables show up as nil ... *touches wood*
|