Hi fellas.
I'm having trouble with oUF.ColorGradient, it was working before 1.6 but somehow it doesn't work right now. I checked the changes in Github and the Gradient function haven't been changed in like years... :/
I use this to color a text displaying the HP percentage of a unit.
This is what I call:
Code:
local r, g, b = oUF.ColorGradient(min / max, unpack(oUF.colors.smooth))
This is my smooth table:
Code:
oUF.colors.smooth = { 1, 0, 0, 1, 1, 0, 1, 1, 1} -- R -> Y -> W
Pretty standard.
This is the error I get:
Message: Interface\AddOns\oUF\colors.lua:65: attempt to perform arithmetic on local 'b2' (a nil value)
Time: 09/29/12 20:04:59
Count: 8
Stack: Interface\AddOns\oUF\colors.lua:65: in function `ColorGradient'
Interface\AddOns\oUF_lumen\oUF_lumen.lua:582: in function <Interface\AddOns\oUF_lumen\oUF_lumen.lua:553>
(tail call): ?
(tail call): ?
Interface\AddOns\oUF\events.lua:69: in function <Interface\AddOns\oUF\events.lua:62>
Locals: a = 0.77720642880199
b = 1
perc = 0.77720642880199
num = 2.6666666666667
segment = 1
relperc = 0.29534404800332
r1 = 1
g1 = 0
b1 = 1
r2 = 1
g2 = 1
b2 = nil
(*temporary) = 1
(*temporary) = 0.29534404800332
(*temporary) = 1
(*temporary) = "attempt to perform arithmetic on local 'b2' (a nil value)"
|
Thanks for any help, I'm clueless.