View Single Post
03-30-09, 09:49 AM   #961
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Originally Posted by nin View Post
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.