Closed Thread
Thread Tools Display Modes
Unread 03-30-09, 09:49 AM   #961
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,297
Originally Posted by nin View Post
this is such a small and probably a little stupid question so i won't start another thread for it

Im having an error msg i quite don't understand why im getting.. it doesn't seem to do anything to my layout more than annoy me..


part of error msg is :

"Attempt to index global 'color' a nil value"

This is the part of the lua that it complains about..

if unit=="target" then
self.Name:SetTextColor(1,1,1)

else
local _, class = UnitClass(unit)
color = self.colors.class[class]
self.Name:SetTextColor(color[1], color[2], color[3])

Any pointers and hints on what it is that can cause this would be much appreciated
Youre probably trying to color some unit which is not a player, which returns the color as nil.
p3lim is offline  
Unread 03-30-09, 10:12 AM   #962
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 210
Originally Posted by p3lim View Post
Youre probably trying to color some unit which is not a player, which returns the color as nil.

hmm yeah that sounds right... any tip on how to solve that easy or would i need to recode a lot of stuff? :P

Guess i was using a lazy way to get all names classcolored but my target, it works as intended just annoying with that message.

gonna see how other people go about in their layouts, best way to learn ^^

thanks..
nin is offline  
Unread 04-03-09, 09:10 AM   #963
Ravenwing
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 11
ouf_mastiff

I am looking for some help with ouf_mastiff.

I am getting the following errors in pvp and with a hunter pet summoned.

interface\addons\ouf_mastiff\ouf_mastiff.lua:94 attempt to perform arithmetic on local 'min' (a nil value)


I do not know all that much about lua editing so I am not all that confident about fixing the problem myself and would appreciate any help.

Sorry if this is the wrong place to post this but I could not find anywhere else to post.
Ravenwing is offline  
Unread 04-03-09, 09:42 AM   #964
Guardix
A Cyclonian
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 42
Originally Posted by nin View Post
hmm yeah that sounds right... any tip on how to solve that easy or would i need to recode a lot of stuff? :P

Guess i was using a lazy way to get all names classcolored but my target, it works as intended just annoying with that message.

gonna see how other people go about in their layouts, best way to learn ^^

thanks..
You can use the UnitIsPlayer() function to determine whether the unit is a player or not.

if unit=="target" then
self.Name:SetTextColor(1,1,1)

elseif UnitIsPlayer(unit) then
local _, class = UnitClass(unit)
color = self.colors.class[class]
self.Name:SetTextColor(color[1], color[2], color[3])
else
self.Name:SetTextColor(0,1,0) -- green
end
Guardix is offline  
Unread 04-04-09, 07:24 AM   #965
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 903
Originally Posted by Ravenwing View Post
I am looking for some help with ouf_mastiff.

I am getting the following errors in pvp and with a hunter pet summoned.

interface\addons\ouf_mastiff\ouf_mastiff.lua:94 attempt to perform arithmetic on local 'min' (a nil value)


I do not know all that much about lua editing so I am not all that confident about fixing the problem myself and would appreciate any help.

Sorry if this is the wrong place to post this but I could not find anywhere else to post.
Seems to be an error in the health function for pets. Try to out-comment line 94 (put -- in front of it) and see if the error message still shows up. If it doesn't you can copy and paste a line from player (or something else that works), in there.

Notepad++ is a free editor that shows line numbers.
Dawn is offline  
Unread 04-04-09, 02:11 PM   #966
neolith
A Fallenroot Satyr
 
neolith's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 22
I'm trying to get my raidframes to show a manabar if the char of that certain frame actually has mana.

This is my code:
Code:
local _, powertype = UnitPowerType(unit)
if powertype == "MANA" then

	hp:SetHeight(height-10)
		
	local pp = CreateFrame"StatusBar"
		
	pp:SetHeight(2)
	pp:SetStatusBarTexture(texture)
	pp.colorPower = true
	pp.frequentUpdates = true
	pp:SetParent(self)
	pp:SetPoint("BOTTOM", 0, 4)
	pp:SetPoint("LEFT", 4, 0)
	pp:SetPoint("RIGHT", -4, 0)
		
	self.Power = pp

end
However the first line of it brings up two errors that I don't understand:
Code:
[2009/04/04 22:02:10-3758-x8]: oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:174: Usage: UnitPowerType("unit"[, index])
oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:174: in function `style'
oUF-1.3.8\ouf.lua:222: in function <Interface\AddOns\oUF\ouf.lua:214>
oUF-1.3.8\ouf.lua:279: in function `configFunction'
Interface\FrameXML\SecureTemplates.lua:518: in function <Interface\FrameXML\SecureTemplates.lua:515>:
<in C code>: in function `securecall'
Interface\FrameXML\SecureTemplates.lua:525: in function `SetupUnitButtonConfiguration':
Interface\FrameXML\SecureTemplates.lua:604: in function <Interface\FrameXML\SecureTemplates.lua:558>:
Interface\FrameXML\SecureTemplates.lua:853: in function `SecureGroupHeader_Update':
<string>:"*:OnShow":1: in function <[string "*:OnShow"]:1>
<in C code>: in function `Show'
oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:350: in main chunk
Code:
[2009/04/04 22:02:10-3758-x3]: oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:174: Usage: UnitPowerType("unit"[, index])
oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:174: in function `style'
oUF-1.3.8\ouf.lua:222: in function <Interface\AddOns\oUF\ouf.lua:214>
oUF-1.3.8\ouf.lua:279: in function `configFunction'
Interface\FrameXML\SecureTemplates.lua:518: in function <Interface\FrameXML\SecureTemplates.lua:515>:
<in C code>: in function `securecall'
Interface\FrameXML\SecureTemplates.lua:525: in function `SetupUnitButtonConfiguration':
Interface\FrameXML\SecureTemplates.lua:604: in function <Interface\FrameXML\SecureTemplates.lua:558>:
Interface\FrameXML\SecureTemplates.lua:853: in function `SecureGroupHeader_Update':
Interface\FrameXML\SecureTemplates.lua:448: in function `SecureGroupHeader_OnAttributeChanged':
<string>:"*:OnAttributeChanged":1: in function <[string "*:OnAttributeChanged"]:1>
<in C code>: in function `SetAttribute'
Interface\FrameXML\SecureTemplates.lua:605: in function <Interface\FrameXML\SecureTemplates.lua:558>:
Interface\FrameXML\SecureTemplates.lua:853: in function `SecureGroupHeader_Update':
<string>:"*:OnShow":1: in function <[string "*:OnShow"]:1>
<in C code>: in function `Show'
oUF_ReebooRaid-ALPHA\oUF_ReebooRaid.lua:350: in main chunk
What's happening here and what is my mistake?
__________________
- The biggest trick the devil ever pulled was convincing the world he didn't exist. -
neolith is offline  
Unread 04-04-09, 04:21 PM   #967
Ravenwing
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 11
Originally Posted by Dawn View Post
Seems to be an error in the health function for pets. Try to out-comment line 94 (put -- in front of it) and see if the error message still shows up. If it doesn't you can copy and paste a line from player (or something else that works), in there.

Notepad++ is a free editor that shows line numbers.
I did as you said and it started throw up all kinds of errors, all of them are within a the following scripts.

I really like these frames and I would hate to stop using them because of this.

I would really appreciate any help with this if anyone can see a problem here.

Code:
local updateHealth = function(self, event, unit, bar, min, max)
	local perc = floor(min/max*100)
	if(not UnitIsConnected(unit)) then
		bar:SetValue(0)
		bar.value:SetText('|cffD7BEA5'..'Offline')
	elseif(unit == 'targettarget') then
		bar.value:SetText()
	elseif(UnitIsDead(unit)) then
		bar.value:SetText('|cffD7BEA5'..'Dead')
	elseif(UnitIsGhost(unit)) then
		bar.value:SetText('|cffD7BEA5'..'Ghost')
	elseif(self:GetAttribute('unitsuffix') == 'pet' or self:GetAttribute('unitsuffix') == 'target')then
 		bar.value:SetText()
        elseif(min==max) then
		bar.value:SetFormattedText(ShortValue(min))
	else
		if(deficit)then
			bar.value:SetFormattedText('|cffff3333'.. ShortValue(min-max).. "|cffffffff | " ..perc)
		else
 			bar.value:SetFormattedText(ShortValue(min).. " | " ..perc)
		end
	end

end
Ravenwing is offline  
Unread 04-05-09, 02:21 AM   #968
Luzzifus
A Warpwood Thunder Caller
 
Luzzifus's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 94
Originally Posted by neolith View Post
I'm trying to get my raidframes to show a manabar if the char of that certain frame actually has mana.

...

What's happening here and what is my mistake?
Did you check if the unit actually is a real unit? Like this:

Code:
if unit then 
	local _, powertype = UnitPowerType(unit)
	if powertype == "MANA" then

		hp:SetHeight(height-10)
		local pp = CreateFrame"StatusBar"
		
		pp:SetHeight(2)
		pp:SetStatusBarTexture(texture)
		pp.colorPower = true
		pp.frequentUpdates = true
		pp:SetParent(self)
		pp:SetPoint("BOTTOM", 0, 4)
		pp:SetPoint("LEFT", 4, 0)
		pp:SetPoint("RIGHT", -4, 0)
			
		self.Power = pp
	end
end
Luzzifus is offline  
Unread 04-05-09, 05:58 AM   #969
neolith
A Fallenroot Satyr
 
neolith's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 22
Originally Posted by Luzzifus View Post
Did you check if the unit actually is a real unit?
That at least removes the errors. Thanks a bunch!

Unfortunately once I do a check for (unit), nothing on the frames gets actually changed. That only happens if I do a check for (not unit).

I'm really confused now.


edit: Ok, I found out that party and raid are not units, hence the behaviour with (not unit). If that's the case, how do I do any checks on single chars in raid or party at all?
__________________
- The biggest trick the devil ever pulled was convincing the world he didn't exist. -

Last edited by neolith : 04-05-09 at 06:14 AM.
neolith is offline  
Unread 04-05-09, 07:28 AM   #970
Luzzifus
A Warpwood Thunder Caller
 
Luzzifus's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 94
Originally Posted by neolith View Post
edit: Ok, I found out that party and raid are not units, hence the behaviour with (not unit). If that's the case, how do I do any checks on single chars in raid or party at all?
Like this (e.g. in your style function or update hooks):

Code:
local unitInRaid = self:GetParent():GetName():match"oUF_Raid" 
local unitInParty = self:GetParent():GetName():match"oUF_Party"
local unitIsPartyPet = unit and unit:find('partypet%d')

if unitInRaid or unitInParty or unitIsPartyPet then
...
end
Luzzifus is offline  
Unread 04-05-09, 03:45 PM   #971
neolith
A Fallenroot Satyr
 
neolith's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 22
Originally Posted by Luzzifus View Post
Like this (e.g. in your style function or update hooks):

Code:
local unitInRaid = self:GetParent():GetName():match"oUF_Raid" 
local unitInParty = self:GetParent():GetName():match"oUF_Party"
local unitIsPartyPet = unit and unit:find('partypet%d')

if unitInRaid or unitInParty or unitIsPartyPet then
...
end
Using (self:GetParent():GetName():match"oUF_Raid") adjusts the layout on all members of my raidgroup. I haven't found a way to display a manabar for only those that have mana yet.
__________________
- The biggest trick the devil ever pulled was convincing the world he didn't exist. -
neolith is offline  
Unread 04-05-09, 05:05 PM   #972
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 643
I'm trying to write myself a name tag that will lower all the letters to lowercase... However, i'm failing right now. I've never even attempted something like this before so sorry if it's a retarded question.

This is what i have so far:
Code:
if (not oUF.Tags['[[lowername]]']) then
	oUF.Tags['[lowername]'] = function(u, r)
	local name = UnitName(r or u)
		name = string.lower(name)
	end
end

oUF.TagEvents['[lowername]'] = 'UNIT_NAME_UPDATE'
Any ideas on what to do?

Thanks in advance,
Wimpsy.
__________________
All I see is strobe lights blinding me in my hindsight.
Wimpface is offline  
Unread 04-05-09, 05:10 PM   #973
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,297
Originally Posted by Wimpface View Post
I'm trying to write myself a name tag that will lower all the letters to lowercase... However, i'm failing right now. I've never even attempted something like this before so sorry if it's a retarded question.

This is what i have so far:
Code:
if (not oUF.Tags['[[lowername]]']) then
	oUF.Tags['[lowername]'] = function(u, r)
	local name = UnitName(r or u)
		name = string.lower(name)
	end
end

oUF.TagEvents['[lowername]'] = 'UNIT_NAME_UPDATE'
Any ideas on what to do?

Thanks in advance,
Wimpsy.
Code:
oUF.TagEvents['[lowername]'] = 'UNIT_NAME_UPDATE'
oUF.Tags['[lowername]'] = function(u)
    return string.lower(UnitName(u))
end
p3lim is offline  
Unread 04-05-09, 05:14 PM   #974
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 643
Thanks p3lim!
__________________
All I see is strobe lights blinding me in my hindsight.
Wimpface is offline  
Unread 04-07-09, 02:45 AM   #975
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 643
I've been trying to spawn my own raid frames for a while using oUF_Perfect as a base. However, i never get more than one raid frame at a time, it's like it never spawns.
Any ideas on what's wrong with this?

The code snippets i have are (Sorry for the long post):
Code:
	for i=1,8 do
	if(self:GetParent():GetName()=="oUF_Raid"..i) then
		if healermode == false then
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('LEFT', self, 2, 10)
			self:Tag(self.Info, '[lowername]')
			
			self.Health:SetHeight(15)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
					
			self:SetAttribute('initial-height', 15)
			self:SetAttribute('initial-width', 100)
		elseif healermode == true then			
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('TOP', self, 0, -2)
			self:Tag(self.Info, '[wmissinghp]')
			
			self.Health:SetHeight(24)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1, left = -1.5, bottom = -1, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
			
			self:SetAttribute('initial-height', 24)
			self:SetAttribute('initial-width', 30)
		end
	end
	end
Code:
local Raid = {}
for i=1,5 do -- number of Raid-Groups, here 5
	local raid = oUF:Spawn('header', 'oUF_Raid'..i)
	raid:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true)
	table.insert(Raid, raidGroup)
	if healermode == false then
		raid:SetAttribute('yOffset', -5)
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 15, -15)
		else
			raid:SetPoint('TOP', raid[i-1], 'BOTTOM', 0, -20)
		end
	elseif healermode == true then
		raid:SetAttribute('yOffset', -5)
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 'TOPRIGHT', -265, -297) -- position of first raidgroup
		else
			raid:SetPoint('TOPLEFT', Raid[i-1], 'TOPRIGHT', -5, 0)
		end
	end
	raid:Show()
end
Thanks in advance.
__________________
All I see is strobe lights blinding me in my hindsight.

Last edited by Wimpface : 04-07-09 at 02:47 AM. Reason: Mommy taught me to say thanks.
Wimpface is offline  
Unread 04-07-09, 03:56 AM   #976
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,297
Originally Posted by Wimpface View Post
I've been trying to spawn my own raid frames for a while using oUF_Perfect as a base. However, i never get more than one raid frame at a time, it's like it never spawns.
Any ideas on what's wrong with this?

The code snippets i have are (Sorry for the long post):
Code:
	for i=1,8 do
	if(self:GetParent():GetName()=="oUF_Raid"..i) then
		if healermode == false then
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('LEFT', self, 2, 10)
			self:Tag(self.Info, '[lowername]')
			
			self.Health:SetHeight(15)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
					
			self:SetAttribute('initial-height', 15)
			self:SetAttribute('initial-width', 100)
		elseif healermode == true then			
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('TOP', self, 0, -2)
			self:Tag(self.Info, '[wmissinghp]')
			
			self.Health:SetHeight(24)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1, left = -1.5, bottom = -1, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
			
			self:SetAttribute('initial-height', 24)
			self:SetAttribute('initial-width', 30)
		end
	end
	end
Code:
local Raid = {}
for i=1,5 do -- number of Raid-Groups, here 5
	local raid = oUF:Spawn('header', 'oUF_Raid'..i)
	raid:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true)
	table.insert(Raid, raidGroup)
	if healermode == false then
		raid:SetAttribute('yOffset', -5)
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 15, -15)
		else
			raid:SetPoint('TOP', raid[i-1], 'BOTTOM', 0, -20)
		end
	elseif healermode == true then
		raid:SetAttribute('yOffset', -5)
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 'TOPRIGHT', -265, -297) -- position of first raidgroup
		else
			raid:SetPoint('TOPLEFT', Raid[i-1], 'TOPRIGHT', -5, 0)
		end
	end
	raid:Show()
end
Thanks in advance.
Code:
table.insert(Raid, raid)
p3lim is offline  
Unread 04-07-09, 04:18 AM   #977
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 643
Originally Posted by p3lim View Post
Code:
table.insert(Raid, raid)
Ah yes, thanks p3lim (again)!
__________________
All I see is strobe lights blinding me in my hindsight.
Wimpface is offline  
Unread 04-07-09, 06:02 AM   #978
ravagernl
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,147
Originally Posted by demitri View Post
Code:
oUF.Tags["[beacon]"] = function(u) return UnitAura(u, "Beacon of Light") and "|cffFF5500.|r" or "" end

oUF.Tags["[shield]"] = function(u) return UnitAura(u, "Sacred Shield") and "|cffFFCF7F.|r" or "" end

oUF.TagEvents["[beacon]"] = "UNIT_AURA"
oUF.TagEvents["[shield]"] = "UNIT_AURA"
is the tags..
Code:
local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"])
Using select, that would be:
Code:
oUF.Tags["[beacon]"] = function(u) return select(8, UnitAura(u, "Beacon of Light")) and "|cffFF5500.|r" or "" end

oUF.Tags["[shield]"] = function(u) return select(8, UnitAura(u, "Sacred Shield")) and "|cffFFCF7F.|r" or "" end

oUF.TagEvents["[beacon]"] = "UNIT_AURA"
oUF.TagEvents["[shield]"] = "UNIT_AURA"
Correct me if I'm wong. Can you post where you put these tags by the way?

Last edited by ravagernl : 04-07-09 at 06:04 AM.
ravagernl is offline  
Unread 04-07-09, 08:35 AM   #979
Wimpface
A Molten Giant
 
Wimpface's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 643
Originally Posted by p3lim View Post
Code:
table.insert(Raid, raid)
It seems i still only get one raid group, i really have no idea what i'm doing wrong but i didn't find anything. This is what i currently have:
Code:
-- Specifies what layout to use for the raid frames
-- 0 = Healermode
-- 1 = DPS mode
local raidlayout = 1
Code:
	for i=1,8 do
	if(self:GetParent():GetName()=="oUF_Raid"..i) then
		if raidlayout == 1 then
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('LEFT', self, 2, 10)
			self:Tag(self.Info, '[lowername]')
			
			self.Health:SetHeight(15)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
					
			self:SetAttribute('initial-height', 15)
			self:SetAttribute('initial-width', 100)
		elseif raidlayout == 0 then			
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('TOP', self, 0, -2)
			self:Tag(self.Info, '[wmissinghp]')
			
			self.Health:SetHeight(24)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1, left = -1.5, bottom = -1, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
			
			self:SetAttribute('initial-height', 24)
			self:SetAttribute('initial-width', 30)
		end
	end
	end
Code:
local Raid = {}
for i=1,5 do -- number of Raid-Groups, here 5
	local raid = oUF:Spawn('header', 'oUF_Raid'..i)
	raid:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffset', -5)
	table.insert(Raid, raid)
	if raidlayout == 1 then
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 24, -220)
		else
			raid:SetPoint('TOP', raid[i-1], 'BOTTOM', 0, -20)
		end
	elseif raidlayout == 0 then
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 'TOPRIGHT', -265, -297) -- position of first raidgroup
		else
			raid:SetPoint('TOPLEFT', Raid[i-1], 'TOPRIGHT', -5, 0)
		end
	end
	raid:Show()
end
EDIT: Also, what does the attribute 'groupFilter' do?
__________________
All I see is strobe lights blinding me in my hindsight.
Wimpface is offline  
Unread 04-07-09, 09:01 AM   #980
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,297
Originally Posted by Wimpface View Post
It seems i still only get one raid group, i really have no idea what i'm doing wrong but i didn't find anything. This is what i currently have:
Code:
-- Specifies what layout to use for the raid frames
-- 0 = Healermode
-- 1 = DPS mode
local raidlayout = 1
Code:
	for i=1,8 do
	if(self:GetParent():GetName()=="oUF_Raid"..i) then
		if raidlayout == 1 then
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('LEFT', self, 2, 10)
			self:Tag(self.Info, '[lowername]')
			
			self.Health:SetHeight(15)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1.5, left = -1.5, bottom = -1.5, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
					
			self:SetAttribute('initial-height', 15)
			self:SetAttribute('initial-width', 100)
		elseif raidlayout == 0 then			
			self.Info = self.Health:CreateFontString(nil, 'OVERLAY')
			self.Info:SetFont(font, fontsize, fontoutline)
			self.Info:SetPoint('TOP', self, 0, -2)
			self:Tag(self.Info, '[wmissinghp]')
			
			self.Health:SetHeight(24)
			self.Power:Hide()
					
			self:SetBackdrop({
				bgFile = 'Interface\\ChatFrame\\ChatFrameBackground',
				insets = {top = -1, left = -1.5, bottom = -1, right = -1}
			})
			self:SetBackdropColor(0, 0, 0)
			
			self:SetAttribute('initial-height', 24)
			self:SetAttribute('initial-width', 30)
		end
	end
	end
Code:
local Raid = {}
for i=1,5 do -- number of Raid-Groups, here 5
	local raid = oUF:Spawn('header', 'oUF_Raid'..i)
	raid:SetManyAttributes('groupFilter', tostring(i), 'showRaid', true, 'yOffset', -5)
	table.insert(Raid, raid)
	if raidlayout == 1 then
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 24, -220)
		else
			raid:SetPoint('TOP', raid[i-1], 'BOTTOM', 0, -20)
		end
	elseif raidlayout == 0 then
		if(i==1) then
			raid:SetPoint('TOPLEFT', UIParent, 'TOPRIGHT', -265, -297) -- position of first raidgroup
		else
			raid:SetPoint('TOPLEFT', Raid[i-1], 'TOPRIGHT', -5, 0)
		end
	end
	raid:Show()
end
EDIT: Also, what does the attribute 'groupFilter' do?
first off, drop the two first lines in the createstyle function and use this:
Code:
if(self:GetParent():GetName():match('oUF_Raid')) then
and your second setpoint has 'raid' instead of 'Raid', which makes it anchor to a header, not the table.
p3lim is offline  
Closed Thread

Go BackWoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion

Thread Tools
Display Modes

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