Originally Posted by haste
Code:
--- 1 2009-09-25 21:28:37.678699761 +0000
+++ 2 2009-09-25 21:29:45.950873460 +0000
@@ -11,5 +11,6 @@
self.Resting.bg:SetPoint("TOPLEFT",self.Resting,"TOPLEFT", -2, 2)
self.Resting.bg:SetPoint("BOTTOMRIGHT",self.Resting,"BOTTOMRIGHT",2,-2)
self.Resting.bg:SetTexture(0, 0, 0)
+ self.Resting.bg:SetParent(self.Resting)
end
end
|
Many thanks for the reply Haste I've added the self.Resting.bg:SetParent(self.Resting) line but it throws an error.
Code:
-- RESTING ICON --
if(unit == "player") then
if UnitLevel("player") ~= MAX_PLAYER_LEVEL then
self.Resting = self.Health:CreateTexture(nil, "OVERLAY")
self.Resting:SetHeight(6)
self.Resting:SetWidth(6)
self.Resting:SetPoint("BOTTOMLEFT", 13, -15)
self.Resting:SetTexture(1, 1, 0)
self.Resting.bg = self.Health:CreateTexture(nil, "BACKGROUND")
self.Resting.bg:SetParent(self.Resting)
self.Resting.bg:SetPoint("TOPLEFT",self.Resting,"TOPLEFT", -2, 2)
self.Resting.bg:SetPoint("BOTTOMRIGHT",self.Resting,"BOTTOMRIGHT",2,-2)
self.Resting.bg:SetTexture(0, 0, 0)
end
end
the error:
Code:
[2009/09/26 09:24:28-5601-x1]: oUF_Harpz-1.1h\oUF_Harpz.lua:576: <unnamed>:SetParent(): Wrong parent object type, expected Frame
oUF_Harpz-1.1h\oUF_Harpz.lua:576: in function `style'
oUF-1.3.21\ouf.lua:250: in function <Interface\AddOns\oUF\ouf.lua:242>
oUF-1.3.21\ouf.lua:318: in function <Interface\AddOns\oUF\ouf.lua:315>
oUF-1.3.21\ouf.lua:368: in function `Spawn'
oUF_Harpz-1.1h\oUF_Harpz.lua:761: in main chunk
---
I know I've done something stupid wrong but i cant figure out what yet.
I look forward to the reply's, learnings fun