Originally Posted by p3lim
First off, your code is far from readable, took me a bit to read that piece of code.
Try the following
Code:
local color
if(UnitIsPlayer(unit)) then
local localized, english = UnitClass(unit)
color = self.colors.class[english]
else
color = UnitSelectionColor(unit)
end
self.Health.bg:SetVertexColor(unpack(color))
if(self.Portraitglosst) then
self.Portraitglosst:SetVertexColor(unpack(color))
end
|
I've been working on cleaning my code up for a while and my health update is the final bit to do :P
Tried it but getting the error: bad argument #1 to 'unpack' (table expected, got number)