GurliGebis / WoWAddon-AngrierWorldQuests

30 stars 14 forks source link

11.0.2-20240910-2 Options not saving #70

Closed Shauren closed 1 week ago

Shauren commented 1 week ago

First four options cannot be unchecked - they reset themselves after closing options panel

obraz

GurliGebis commented 1 week ago

Interresting, I take a look at it 🙂 Does none of the other settings save for you?

GurliGebis commented 1 week ago

I found the issue and have a fix ready - will release it later today.

The issue is that "false" and "nil" are the same in Lua ... so now we have to store settings as strings instead.

GurliGebis commented 1 week ago

I have released 11.0.2-20240911-1 with the fix for this 🙂

Dairyman commented 1 week ago

Sorry but nil and false are not the same 😉. The problem is that false and nil are not trueish so

local f = false
local n = nil

-- these two are both false
if n then end
if f then end

-- n is false but f is true
if n == false then end
if f == false then end

-- n is true but f is false
if n == nil then end
if f == nil then end

You need to check directly for false or nil in such situation.

GurliGebis commented 1 week ago

I see, good to know 🙂 I'm not going to change it back though, since it works with saving them as strings.