Hello!
Got some questions about lua addresses, not sure how I can explain it but I'll give it a go
Not gonna give my whole code though, since it's a pretty general question. I'll just jump to it:
Let's say I have an addon with 2 files. The first one looks like this, it changed profiles:
Lua Code:
local _, ns = ...
function SetID(id)
ns.settings = _G.SavedVars[id]
end
ns.settings = _G.SavedVars['default']
The second on wants to use the ns.settings variable:
Lua Code:
local _, ns = ...
local x = ns.settings
Lets say i call SetID('volvo'), isn't the local variable "x" supposed to point to SavedVars['volvo'] then, or is it pointing to the old value of ns.settings? It seemed like it was the latter, but i thought it would be opposite.
Thanks for your time!
Edit // When I explained it that well to myself it makes sense to point to the old ns.setting variable, dumb me.