From 2a98dc961d3635ab1ed5758741637fa86fabc1b8 Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 17 May 2016 23:19:14 -0500 Subject: [PATCH] Fixed up debugging Apparently isFirst is no longer passed to OnEnable, so we were never setting a debug frame. Made the additional arguments that were being passed to Debug() actually do something (currently print out a stringified version of themselves in a space-delimited string) --- IceHUD.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/IceHUD.lua b/IceHUD.lua index 46d2a51..ca27022 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -272,10 +272,10 @@ function IceHUD:OnEnable(isFirst) IceHUD_Options:OnLoad() --@end-debug@ - if isFirst then +-- if isFirst then self:SetDebugging(self.IceCore:GetDebug()) - self.debugFrame = ChatFrame2 - end + self.debugFrame = ChatFrame1 +-- end end -- add settings changes/updates here so that existing users don't lose their settings @@ -358,8 +358,12 @@ function IceHUD:LoadOptions() return true end -function IceHUD:Debug(msg) +function IceHUD:Debug(...) if self.debugging then + local msg = "" + for n=1,select('#', ...) do + msg = msg .. tostring(select(n, ...)) .. " " + end self.debugFrame:AddMessage(msg) end end