Originally Posted by Fizzlemizz
It doesn't check if the GMEXP_CFG exists so on a new install where the game has created the placeholder (GMEXP_CFG = nil) but you haven't assigned a table to it, this will fail.
Lua Code:
if event == "PLAYER_LOGIN" then if not GMEXP_CFG then GMEXP_CFG = {} end -- etc. end
With your code, if a user sets a setting to nil it will be reset on next login which is probably not desired and depends on your configuration setup.
|
Ciao Fizzlemizz.
I am doing this in the first part of the addon ...
Lua Code:
local ADDON, namespace = ...
local L = namespace.L
GMEXP_NAMES = GMEXP_NAMES or {}
GMEXP_CFG = GMEXP_CFG or {}
-- go on
... because I didn't think I couldn't move them there
Now that I know I can I'll move them there.
Thanks so much Fizzlemizz.