Originally Posted by Dekthro
It is listed, I also tried adding in the debug output
Lua Code:
function Dek01:Initialize() d("Initializing") Dek01.savedVars = ZO_SavedVars:New("Dek01Vars", Dek01.varVersion, nil, Dek01.Default) Dek01.CreateSettingsWindow() d(Dek01.savedVars.Show)
|
Ah. I see I wasn't quite clear here. I was suggesting something just before line 39:
Lua Code:
d("window="..tostring(Dek01StaminaBarWindow))
d("Dek01="..tostring(Dek01))
d("Dek01.savedVars="..tostring(Dek01.savedVars))
d("d.s.Show="..tostring(Dek01.savedVars.Show))
-- line 39 contains this:
Dek01StaminaBarWindow:SetHidden(not Dek01.savedVars.Show)
That should break on the line with the nil dereference, and make it clear where the issue is coming from. Then you have to figure out *why*, but that is a simpler problem once you know what.
PS: depending on taste, you may want to steal the `dmsg` function from my ReadItOnce addon, which automates the `tostring` parts of that.