Lua Code:
local numIcons = 5
local iconSpacing = 5 -- need wider spacing
local iconWidth = ((cfg.player.width/5) - (iconSpacing * (numIcons - 1)) / numIcons)
local iconHeight = (cfg.player.height / 4)
local ClassIcons = {}
for index = 1, numIcons do
local Icon = CreateFrame("Button", nil, self)
Icon:SetNormalTexture(cfg.statusbar_texture)
Icon:GetNormalTexture():SetAllPoints(true)
Icon:SetSize(iconWidth, iconHeight)
if index > 1 then
Icon:SetPoint("LEFT", ClassIcons[index-1], "RIGHT", iconSpacing, 0)
else
Icon:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT")
end
if isBeautiful then -- !Beautycase load check
Icon:CreateBeautyBorder(12)
Icon:SetBeautyBorderPadding(1)
end
ClassIcons[index] = Icon
end
self.ClassIcons = ClassIcons
end
nets me this error
Code:
2x oUF\elements\classicons.lua:81: attempt to call method 'SetVertexColor' (a nil value)
oUF\elements\classicons.lua:81: in function <oUF\elements\classicons.lua:60>
oUF\elements\classicons.lua:248: in function 'enable'
oUF\ouf-1.6.8.lua:99: in function 'EnableElement'
oUF\ouf-1.6.8.lua:269: in function <oUF\ouf.lua:192>
(tail call): ?
oUF\ouf-1.6.8.lua:552: in function 'Spawn'
oUF_Bob\modules\units.lua:690: in function 'func'
oUF\factory.lua:20: in function <oUF\factory.lua:16>
(tail call): ?
Did i miss something?