From c1b667ca97ce9a741f747a244608f70f5c305e4d Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Thu, 22 Oct 2009 14:58:20 -0500 Subject: [PATCH] changed configSaveWeight to use GetNumber instead of tonumber --- config.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config.lua b/config.lua index 5211306..4b87262 100644 --- a/config.lua +++ b/config.lua @@ -84,15 +84,15 @@ function configResetWeight(weight) end function configSaveWeight(weight) + local number + for _, frame in pairs(ww_statFrameTable) do if frame.statName then - value = frame.statValue:GetText() - if value == "" then - value = nil - else - value = tonumber(value) + number = frame.statValue:GetNumber() + if number == 0 then + number = nil end - ww_vars.weightsList[weight.category.class][weight.name][frame.statName] = value + ww_vars.weightsList[weight.category.class][weight.name][frame.statName] = number end end end -- 1.7.9.5