Thread: lua error
View Single Post
04-16-10, 10:53 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,928
Yes, that is indeed the line that errors out .. either unit_id is bad or name is bad.

Code:
function nUI_Unit:updateLabelInfo( unit_id, unit_info )

--	nUI_ProfileStart( ProfileCounter, "updateLabelInfo" );
	
	modified  = false;
	
	if unit_info then
		
		-- check to see if the label has changed
		
		name, realm = UnitName( unit_id );

		if unit_info.status_info and unit_info.status_info.is_dnd then
			name = ("%s |cFF00FFFF(%s)|r"):format( name, nUI_L["DND"] );		end
		
		if unit_info.name ~= name
		or unit_info.realm ~= realm
		then
			
			modified              = true;
			unit_info.last_change = GetTime();
			unit_info.name        = name;
			unit_info.realm       = realm;
			
		end
	end
	
--	nUI_ProfileStop();
	
	return modified and unit_info or nil;
	
end
__________________


Characters:
Gwynedda - 70 - Demon Warlock
Galaviel - 65 - Resto Druid
Gamaliel - 61 - Disc Priest
Gwynytha - 60 - Survival Hunter
Lienae - 60 - Resto Shaman
Plus several others below level 60

Info Panel IDs : http://www.wowinterface.com/forums/s...818#post136818