CTMod

CTMod

766k Downloads

CT_Timer bad argument #1 to 'SetAlpha'

DaGrump2394 opened this issue ยท 2 comments

commented

Message: Interface/AddOns/CT_Timer/CT_Timer.lua:80: bad argument #1 to 'SetAlpha' (Usage: self:SetAlpha(alpha))
Time: Fri Nov 17 12:43:21 2023
Count: 6
Stack: Interface/AddOns/CT_Timer/CT_Timer.lua:80: bad argument #1 to 'SetAlpha' (Usage: self:SetAlpha(alpha))
[string "=[C]"]: in function `SetAlpha'
[string "@Interface/AddOns/CT_Timer/CT_Timer.lua"]:80: in function <Interface/AddOns/CT_Timer/CT_Timer.lua:79>
[string "@Interface/AddOns/CT_Timer/CT_Timer.lua"]:110: in function <Interface/AddOns/CT_Timer/CT_Timer.lua:100>

Locals: (*temporary) = CT_TimerFrameHeaderTexture {
0 =
}
(*temporary) = -0.000000

I traced this to CT_Timer.alpha becoming <0 (as in -9.7e-17) in the final iteration of the loop in the bgFadeOut function at line 100.

commented

I think this will fix it.

Line 91
CT_Timer.alpha = min(CT_Timer.alpha + 0.05, 1)

Line 104
CT_Timer.alpha = max(0, CT_Timer.alpha - 0.05)

commented

That's EXACTLY what I did to verity the issue... and it worked