Originally Posted by Caellian
If it has to be something like this which look quite weird to me:
Code:
oUF.Tags['[perchealth]'] = function(unit)
local min, max = UnitHealth(unit), UnitHealthMax(unit)
if UnitHealthMax(unit) > UnitHealth(unit) then
return Hex(self.ColorGradient(min/max, 0.69, 0.31, 0.31, 0.65, 0.63, 0.35, 0.33, 0.59, 0.33))..oUF.Tags['[perhp]'](unit)
end
end
Then
Code:
oUF_cTags.lua:33: attempt to index global 'self' (a nil value)
But i guess that's not how it's supposed to be.
|
This error occurs because you shouldn't use self.ColorGradient inside a Tag but oUF.ColorGradient .
Edit: haste owned me