View Single Post
02-28-13, 05:39 PM   #2
Haleth
This Space For Rent
 
Haleth's Avatar
Featured
Join Date: Sep 2008
Posts: 1,173
I don't see exactly how your topic title relates to what you're asking.

Anyhow. What's probably happening is that your addon loads after Shadowed Unit Frames. You need to delay all code with references to ShadowUF until it actually exists. You can do this by registering the ADDON_LOADED event and letting your code run only once the addon parameter is what you need.

For example;

Code:
local f = CreateFrame("Frame")
f:RegisterEvent("ADDON_LOADED")
f:SetScript("OnEvent", function(self, event, addon)
	if addon ~= "ShadowedUnitFrames" then return end
	self:UnregisterEvent("ADDON_LOADED") -- Once we have the addon we need, we don't need to register anymore

	... -- Your code here
end)
I don't know what the actual addon is called so you'll have to replace that.
  Reply With Quote