View Single Post
07-23-16, 02:41 AM   #1
plopek
A Deviate Faerie Dragon
AddOn Compiler - Click to view compilations
Join Date: Aug 2014
Posts: 18
Question CooldownFrame_SetTimer

Hello everyone,

I was using that script before to watch my trinket proc etc, but it doesn't work enymore. Dunno why
Can anyone take a look and help me fix it?

Lua Code:
  1. local t=CreateFrame("FRAME")
  2. t:SetPoint("CENTER",ParentUI,2,12)
  3. t:SetSize(30,30)
  4. t.c=CreateFrame("Cooldown","cd1")
  5. t.c:SetAllPoints(t)
  6. t.t=t:CreateTexture(nil,"BORDER")
  7. t.t:SetAllPoints()
  8. t.t:SetTexture("Interface\\Icons\\spell_holy_crusaderstrike")
  9. t:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
  10.  
  11. t:SetScript("OnEvent", function(...)
  12.     local b,_,_,e,_,_,_,_,_,_,l = select(4, ...)
  13.         if (e == UnitName("Player") and (b=="SPELL_AURA_APPLIED" or b=="SPELL_AURA_REFRESH")and l==209785) then CooldownFrame_SetTimer(cd1,GetTime(),15,1) end end)

Im getting following errors in game:
Lua Code:
  1. Message: Interface\AddOns\Frames\ExtraCD.lua:13: attempt to call global 'CooldownFrame_SetTimer' (a nil value)
  2. Time: 07/23/16 10:39:12
  3. Count: 3
  4. Stack: Interface\AddOns\Frames\ExtraCD.lua:13: in function <Interface\AddOns\Frames\ExtraCD.lua:11>
  5.  
  6. Locals: b = "SPELL_AURA_APPLIED"
  7. _ = false
  8. _ = "Player-3687-05F192B7"
  9. e = "Dasté"
  10. _ = 1297
  11. _ = 0
  12. _ = "Player-3687-05F192B7"
  13. _ = "Dasté"
  14. _ = 1297
  15. _ = 0
  16. l = 209785
  17. (*temporary) = nil
  18. (*temporary) = cd1 {
  19.  0 = <userdata>
  20. }
  21. (*temporary) = 414616.146
  22. (*temporary) = 15
  23. (*temporary) = 1
  24. (*temporary) = "attempt to call global 'CooldownFrame_SetTimer' (a nil value)"

Thanks in advance.