Thread Tools Display Modes
10-02-09, 11:56 AM   #1
Astrocanis
A Black Drake
Join Date: Mar 2005
Posts: 84
Unit Frame Bug Report

Scott;

Sorry to bother you, but I have been getting this for a couple of days. I have removed all my addons except for nUI. This occurs when logging in, and zoning out of BGs.

Message: Interface\AddOns\nUI\Units\nUI_UnitLabel.lua:321: bad argument #1 to 'format' (string expected, got nil)
Time: 10/02/09 11:53:00
Count: 1
Stack: [string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:18: in function <[string "Interface\FrameXML\BasicControls.xml:<Scrip..."]:4>
[C]: ?
[C]: in function `format'
Interface\AddOns\nUI\Units\nUI_UnitLabel.lua:321: in function `updateLabelInfo'
Interface\AddOns\nUI\Units\nUI_UnitLabel.lua:192: in function <Interface\AddOns\nUI\Units\nUI_UnitLabel.lua:174>

Locals: (*temporary) = "%s (%s)"
(*temporary) = nil
(*temporary) = "DND"
(*temporary) = "string expected, got nil"
 
10-02-09, 03:17 PM   #2
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
That's very odd... the only way that can happen is if WoW is passing a NIL unit name. In any event, if you replace the updateLabelInfo method in [ Interface > AddOns > nUI > Units > nUI_UnitLabel.lua ] with the following, it will fix that problem...

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 name then
            
            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
    end
    
--    nUI_ProfileStop();
    
    return modified and unit_info or nil;
    
end
__________________

What people don't get is that I am, ultimately, an artist at heart.
My brush has two colors, 1 and 0, and my canvas is made of silicon.



Official nUI Web Site: http://www.nUIaddon.com
Official nUI Support Forum: http://forums.nUIaddon.com
My day job: http://www.presidio.com/
 
10-03-09, 08:20 AM   #3
Astrocanis
A Black Drake
Join Date: Mar 2005
Posts: 84
I thought it was, too. It's only been happening for a few days, and I'm not running any other mods (for isolation). It's also intermittent and seems to happen the most just after getting out of EotS.

Thanks for the fix. I'll update this after I've messed with it a bit.
 
 

WoWInterface » Featured Projects » nUI, MozzFullWorldMap and PartySpotter » Support » nUI: Bug Reports » Unit Frame Bug Report


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off