Quantcast
WoWInterface - View Single Post - upvalue functions and default key values of an array
View Single Post
04-06-20, 11:55 AM   #5
gmarco
A Frostmaul Preserver
 
gmarco's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 290
Uhm I have to rewritten it in this way:

Lua Code:
  1. if event == "PLAYER_LOGIN" then
  2.     local GMEXP_DEFAULTS = { LONGNRFMT = false, SCALE = 1, LIST = true, MAXLIST = 12 }
  3.     for k in pairs(GMEXP_DEFAULTS) do
  4.         if GMEXP_CFG[k] == nil then GMEXP_CFG[k] = GMEXP_DEFAULTS[k] end
  5.     end
  6. end

or the values = false are overwritten by defaults like they (I wrongly supposed) were nil. And it is not what I am looking for.
In this way it works.
__________________
This is Unix-Land. In quiet nights, you can hear the Windows machines reboot.
  Reply With Quote