Quantcast
WoWInterface - View Single Post - Classicon help
Thread: Classicon help
View Single Post
03-08-15, 06:05 PM   #5
10leej
A Molten Giant
 
10leej's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2011
Posts: 579
Lua Code:
  1. local numIcons = 5
  2. local iconSpacing = 5 -- need wider spacing
  3. local iconWidth = ((cfg.player.width/5) - (iconSpacing * (numIcons - 1)) / numIcons)
  4. local iconHeight = (cfg.player.height / 4)
  5.  
  6. local ClassIcons = {}
  7.  
  8. for index = 1, numIcons do
  9.     local Icon = CreateFrame("Button", nil, self)
  10.     Icon:SetNormalTexture(cfg.statusbar_texture)
  11.     Icon:GetNormalTexture():SetAllPoints(true)
  12.     Icon:SetSize(iconWidth, iconHeight)
  13.     if index > 1 then
  14.         Icon:SetPoint("LEFT", ClassIcons[index-1], "RIGHT", iconSpacing, 0)
  15.     else
  16.         Icon:SetPoint("TOPLEFT", self.Power, "BOTTOMLEFT")
  17.     end
  18.     if isBeautiful then -- !Beautycase load check
  19.         Icon:CreateBeautyBorder(12)
  20.         Icon:SetBeautyBorderPadding(1)
  21.     end
  22.     ClassIcons[index] = Icon
  23. end
  24.  
  25. self.ClassIcons = ClassIcons
  26. 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?
__________________
Tweets Facebook YouTube Website
  Reply With Quote