View Single Post
03-21-09, 11:52 PM   #12
spiel2001
nUI's Author
 
spiel2001's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 7,724
Okay.. first of all.. it should be hooked into an event and it should be executed on the "ADDON_LOADED" event so that we're sure it does not try to update nUI's default layout tables until after we know that have been loaded and initialized and before any user customization is applied which occurs in the "VARIABLES_LOADED" event.

Second, and this may sound silly... but did you ever give "skinName" a value?

Code:
local skins =
{
    [1] = "PlayerTarget",
    [2] = "HealthPower",
};

for i in pairs( skins ) do
    local skinName = skins[i];

    if nUI_UnitSkins[skinName] then
        nUI_UnitSkins[skinName].elements["Level"] = myLevelBlock;
    end
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/