View Single Post
04-07-12, 02:08 PM   #19
MiRai
A Warpwood Thunder Caller
Join Date: Jul 2011
Posts: 96
Choonster from the WoW forums whipped up this code in an attempt for a fix:

Lua Code:
  1. local function SkinBar(barName)
  2.     local bar = type(barName) == "string" and _G[barName] or barName
  3.     bar:SetParent(UIParent)
  4.     bar:SetScale(1)
  5.     bar:SetHeight(16)
  6.     bar:SetWidth(280)
  7.     bar:SetBackdropColor(0.1, 0.1, 0.1)
  8.    
  9.     for _, region in pairs({ bar:GetRegions() }) do
  10.         if region.GetTexture and region:GetTexture() == "SolidTexture" then
  11.             region:Hide()
  12.         end
  13.     end
  14.    
  15.     local border = _G[barName.."Border"]
  16.     border:Hide()
  17.    
  18.     local background = bar:CreateTexture(barName.."Background", "BACKGROUND")
  19.     background:SetTexture(cfg.statusbar_texture)
  20.     background:SetAllPoints(bar)
  21.     background:SetVertexColor(.15,.15,.15,.75)
  22.    
  23.     local statusbar = _G[barName.."StatusBar"]
  24.     statusbar:SetAllPoints(bar)
  25.    
  26.     local text = _G[barName.."Text"]
  27.     text:SetFont(cfg.font, 14, "THINOUTLINE")
  28.     text:ClearAllPoints()
  29.     text:SetPoint("CENTER", statusbar, 0, 1)
  30.    
  31.     local glow = CreateFrame("Frame", nil, bar)
  32.     glow:SetFrameLevel(0)
  33.     glow:SetPoint("TOPLEFT", -5, 5)
  34.     glow:SetPoint("BOTTOMRIGHT", 5, -5)
  35.     lib.gen_backdrop(glow)
  36. end
  37.  
  38. -- mirror castbar!
  39. lib.gen_mirrorcb = function(f)
  40.     for _, barName in pairs({"MirrorTimer1", "MirrorTimer2", "MirrorTimer3"}) do
  41.         SkinBar(barName)
  42.     end
  43. end
  44.  
  45. -- timers
  46. TimerTracker:HookScript("OnEvent", function(self, event, ...))
  47.     if event == "START_TIMER" then
  48.         for i, timer in ipairs(self.timerList) do
  49.             SkinBar(timer)
  50.         end
  51.     end
  52. end

However, it is throwing up this error:
Code:
Message: Interface\AddOns\oUF_Fail\lib.lua:694: unexpected symbol near ')'
Time: 04/07/12 14:05:17
Count: 1
Stack: 
Locals:

Line 694 is line 46 above and I tried changing ... to .. just to see what it wants and it tells me it expects '...' so, I don't know what unexpected symbol it's seeing?
  Reply With Quote