Hi.
I've been trying to the raidgroup number of my raidgroups next to the raidframe, and I seem to have some problems creating the fontstrings.
Here's what I have so far.
Code:
if (GetNumRaidMembers() > 0) then
local raidGroupYpos = -30
local raidGroupXpos = 5
local raidGroup1Text = CreateFontString(nil, "OVERLAY")
raidGroup1Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos)
local raidGroup2Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-10)
local raidGroup3Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-20)
local raidGroup4Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-30)
local raidGroup5Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-40)
local raidGroup6Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-50)
local raidGroup7Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-60)
local raidGroup8Text = CreateFontString(nil, "OVERLAY")
raidGroup2Text:SetPoint("LEFT", UIParent, raidGroupXpos, raidGroupYpos-70)
self:SetWidth(10)
self:SetHeight(13)
self:SetTextColor(1, 1, 1)
self:SetFont("Interface\\AddOns\\!LynSettings\\fonts\\font2.ttf", 16, "OUTLINE")
self:SetScript("OnUpdate", self.update)
for i=1, MAX_RAID_MEMBERS do
local _, _, subgroup, _, _, _, _, _, _ = GetRaidRosterInfo(i); --[[name, rank, subgroup, level, class, fileName, zone, online, isDead]]--
if (subgroup == 1)then
raidGroup1Text:SetText(subgroup)
else
raidGroup1Text:SetText("")
end
if (subgroup == 2) then
raidGroup2Text:SetText(subgroup)
else
raidGroup2Text:SetText("")
end
end
end
Any ideas?
Error: Attempt to call global a nil value.
(this is at the end of my ouf_layout, design file though)