Originally Posted by nin
this is such a small and probably a little stupid question so i won't start another thread for it
Im having an error msg i quite don't understand why im getting.. it doesn't seem to do anything to my layout more than annoy me..
part of error msg is :
"Attempt to index global 'color' a nil value"
This is the part of the lua that it complains about..
if unit=="target" then
self.Name:SetTextColor(1,1,1)
else
local _, class = UnitClass(unit)
color = self.colors.class[class]
self.Name:SetTextColor(color[1], color[2], color[3])
Any pointers and hints on what it is that can cause this would be much appreciated
|
Youre probably trying to color some unit which is not a player, which returns the color as nil.