Thread Tools Display Modes
01-15-13, 02:20 AM   #1
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
oUF help: Power Bars and Such

I am extremely new to lua, and I have a nasty habit of trying to learn by breaking things in the code for an oUF layout by fiddling with numbers to see what it does. Thus far, it has garnered some success for me, but this latest problem I fear goes beyond my elementary understanding.

My unit frames (oUF Zulu) are almost exactly how I want them except for one minor issue: the power bars.

The author decided to not use a background for classes that are not DKs. (A paladin in the picture below.) The color is also white.



Quite simply, I want all power bars across classes to be in the same style as the DK rune bars and have a small 1-2px gap between each instead of the current gap size. I would also like to change the color from white to the standard resource color for each class.



I've tried playing with just about every number I saw, but I haven't hit upon the solution. I am aiming for a look similar to the following (I understand the outline is separate.)




This is the section of the code which, I think, pertains to the area of interest.

Code:
	        local _, class = UnitClass("player")
        -- Runes
        if class == "DEATHKNIGHT" then
            local count = 6

            local bars = CreateFrame("Frame", nil, self)
            bars:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 0, 2)
            bars:SetSize(230/count - 5, 6)

            local i = count
            for index = 1, count do
                bars[i] = createStatusbar(bars, texture, nil, 6, 230/count-5, 1, 1, 1, 1)

                if i == count then
                    bars[i]:SetPoint("TOPLEFT", bars, "TOPLEFT")
                else
                    bars[i]:SetPoint("RIGHT", bars[i+1], "LEFT", -5, 0)
                end

                bars[i].bg = bars[i]:CreateTexture(nil, "BACKGROUND")
                bars[i].bg:SetAllPoints(bars[i])
                bars[i].bg:SetTexture(texture)
                bars[i].bg.multiplier = .2

                bars[i].bd = createBackdrop(bars[i], bars[i])
                i=i-1
            end

            bars[3], bars[4], bars[5], bars[6] = bars[5], bars[6], bars[3], bars[4]
            self.Runes = bars
        end

		-- ShadowOrbs, HolyPower, SoulShards, Harmony
		if class == "PRIEST" or class == "PALADIN" or class == "WARLOCK" or class == "MONK" then
				
		local count
        if class == "PALADIN" then
			count = 5
		elseif class == "WARLOCK" then
            count = 4
		elseif class == "MONK" then
            count = 5
        else
            count = 3 
        end
			
		local ClassIcons = CreateFrame("Frame", nil, self)
		ClassIcons:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 4)
		ClassIcons:SetSize(230/count - 5, 2)

		for i = 1, 5 do
			local Icon = CreateFrame("StatusBar", nil, ClassIcons)
			Icon:SetSize(230/count-5, 6)
			Icon:SetStatusBarTexture(texture)
			Icon.bd = createBackdrop(Icon, Icon)
			Icon.multiplier = .2
			Icon.SetVertexColor = Icon.SetStatusBarColor
			
			if i == 1 then
				Icon:SetPoint("LEFT", ClassIcons)
			else
				Icon:SetPoint("LEFT", ClassIcons[i-1], "RIGHT", 5, 0)
			end
			
			ClassIcons[i] = Icon
		end	
		
		self.ClassIcons = ClassIcons
		end
		
        if class == "DRUID" then
            local ebar = CreateFrame("Frame", nil, self)
            ebar:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", 0, 8)
            ebar:SetSize(225, 4)
            ebar.bd = createBackdrop(ebar, ebar)

            local lbar = createStatusbar(ebar, texture, nil, 4, 225, 0, .4, 1, 1)
            lbar:SetPoint("LEFT", ebar, "LEFT")
            ebar.LunarBar = lbar

            local sbar = createStatusbar(ebar, texture, nil, 4, 225, 1, .6, 0, 1)
            sbar:SetPoint("LEFT", lbar:GetStatusBarTexture(), "RIGHT")
            ebar.SolarBar = sbar

            ebar.Spark = sbar:CreateTexture(nil, "OVERLAY")
            ebar.Spark:SetTexture[[Interface\CastingBar\UI-CastingBar-Spark]]
            ebar.Spark:SetBlendMode("ADD")
            ebar.Spark:SetAlpha(0.5)
            ebar.Spark:SetHeight(16)
            ebar.Spark:SetPoint("LEFT", sbar:GetStatusBarTexture(), "LEFT", -15, 0)

            self.EclipseBar = ebar
            self.EclipseBar.PostUnitAura = updateEclipse
        end
Any help would be greatly appreciated.

Last edited by Solarin : 01-15-13 at 02:26 AM.
  Reply With Quote
01-15-13, 06:06 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
For future reference, please use a paste site (or just attach the file) when posting longer blocks of code. Selecting that many lines in a tiny scrolling box to copy/paste them in a text editor is really painful.

Anyway, try replacing the part of the code you posted up to (but not including) the if class == "DRUID" then line with this:

http://www.wowace.com/paste/6920/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.

Last edited by Phanx : 01-16-13 at 04:29 PM.
  Reply With Quote
01-15-13, 04:57 PM   #3
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Originally Posted by Phanx View Post
For future reference, please use a paste site (or just attach the file) when posting longer blocks of code. Selecting that many lines in a tiny scrolling box to copy/paste them in a text editor is really painful.

Anyway, try replacing the part of the code you posted up to (but not including) the if class == "DRUID" then line with this:

http://www.wowace.com/paste/6911/
First off, thank you very much for helping me out. I'll certainly use a paste site in the future.

When I replace the code with what you supplied it yields this error for every character.

Code:
Date: 2013-01-15 16:53:19
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\oUF_Zulu\zulu.lua line 642:
   ')' expected near ','
Debug:
   
Locals:

AddOns:
  Swatter, v5.15.5383 (LikeableLyrebird)
  Ace3, v
  ACP, v3.4.1 
  AddonLoader, v2.0.1
  AtlasLootLoader, vv7.04.01
  Auditor2, v4.4.2
  BadBoy, v11.507
  BadBoyCCleaner, v3.62
  BadBoyLevels, v2.94
  BankStack, vv29
  Bartender4, v4.5.8
  BrokerAuditor, v4.4.2
  BrokerLFG, v5.1.0.48
  ButtonFacade, v5.0.389
  CallbackHandler10, v
  cBrokerRecount, v1.01
  CeaphyrelsAutoAcceptInvite, v1.2
  ChatLoot, v1.5
  Chatter, vv1.4.1
  ChocolateBar, vv2.3.3
  CLCDK, v5.0.4
  CLCRet, v
  DXELoader, v
  ElkBuffBars, v2.3.2-169
  EnhancedColourPicker, v4
  FactionAddict, v1.09
  FBBroker, v1.19f
  fontain, v
  ForteCasting, v
  ForteClass, v
  ForteCooldown, v
  ForteCore, v1.980.8
  ForteHealthstone, v
  ForteSoulstone, v
  ForteSummon, v
  ForteTalent, v
  ForteTimer, v
  GupPet, v2.104
  GupPetButtonFacade, v0.2
  kgPanels, v1.14
  LibAbacus30, v
  LibAboutPanel, v1.6.0
  LibActionButton10, v
  LibDBIcon10, v
  LibDDI10, v
  LibDialog10, vr50-release
  LibDualSpec10, vv1.8
  LibKeyBound10, v
  LibMapData10, v1.0.0.27-release
  LibQTip10, vr154-release 
  LibQTipClick11, vr10 
  LibSharedMedia30, v3.0-74
  LibSink20, v
  LibStub, v
  LibWindow11, v1.1.10
  Mapster, v1.5.1
  Masque, v5.1.389
  MasqueCaith, v5.1.82
  MasqueDarion, v4.1.2
  MasqueOnyx, v5.1.76
  MasqueSerenity, v5.1.76
  MasqueSleek, v5.1.0
  MicroExperience, v40000.6
  MikScrollingBattleText, v5.7.125
  Misspelled, v1.5.09
  Omen, v3.1.8
  OmniCC, v5.1.3
  OneClickEnchantScroll, v9
  oUF, v1.6.1
  oUFExperience, v50001.13-Release
  oUFMovableFrames, v1.16
  oUFReputation, v50001.8-Release
  oUFSpellRange, v5.0.0.2
  oUFZulu, v1.0
  Outfitter, v5.7
  Overachiever, v0.70
  OverachieverTrade, v0.70
  PowerAuras, v5.0.0.P
  Quartz, v3.1.1
  QuestMyMap, v1.2.1
  Recount, v
  RepairBroker, v5.1.0
  SharedMedia, v3.0.5-184
  SharedMediaAdditionalFonts, v1.0.13
  SharedMediaLib, v1.0
  SimpleRaidTargetIcons, v1.21
  TipTac, v12.10.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.09.05
  VuhDo, v3.25
  VuhDoOptions, v3.25
  WIM, v3.6.3
  WIMSkinSpartanUI, v
  XLoot, v0.91.7
  XLootGroup, vz15-repack-release
  XLootMaster, v0.82
  XLootMonitor, v0.72
  ZOMGBuffs, vr217
  BlizRuntimeLib_enUS v5.1.0.50100 <us>
  (ck=8ac)
Line 642 for me corresponds to line 36 of the code block you provided. Once again, thanks for your help Phanx!

Last edited by Solarin : 01-15-13 at 05:05 PM.
  Reply With Quote
01-15-13, 07:36 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Take out the ) at the end of that line.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-15-13, 07:37 PM   #5
humfras
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Oct 2009
Posts: 131
Remove the bracket ')' at the end of the line.
bg.multipler) > bg.multipler
__________________
Author of VuhDo CursorCastBar OptiTaunt Poisoner RaidMobMarker
  Reply With Quote
01-15-13, 07:42 PM   #6
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Originally Posted by Seerah View Post
Take out the ) at the end of that line.
I removed the ")" and it spit out another error.

Code:
Date: 2013-01-15 19:39:07
ID: 2
Error occured in: Global
Count: 1
Message: ..\AddOns\oUF_Zulu\zulu.lua line 620:
   <unnamed>:SetPoint(): trying to anchor to itself
Debug:
   [C]: SetPoint()
   oUF_Zulu\zulu.lua:620: styleFunc()
   oUF\ouf.lua:262:
      oUF\ouf.lua:192
   (tail call): ?
   oUF\ouf.lua:552: Spawn()
   oUF_Zulu\zulu.lua:1098:
      oUF_Zulu\zulu.lua:1089
   oUF_Zulu\zulu.lua:1104: func()
   oUF\factory.lua:20:
      oUF\factory.lua:16
   (tail call): ?
Locals:
(*temporary) = <unnamed> {
 0 = <userdata>
}
(*temporary) = "TOPRIGHT"
(*temporary) = <unnamed> {
 0 = <userdata>
}

AddOns:
  Swatter, v5.15.5383 (LikeableLyrebird)
  NPCScan, v5.0.0.5
  NPCScanOverlay, v5.0.0.3
  Ace3, v
  ACP, v3.4.1 
  AddonLoader, v2.0.1
  Archy, v1.8.39
  AtlasLootLoader, vv7.04.01
  Auditor2, v4.4.2
  BadBoy, v11.507
  BadBoyCCleaner, v3.62
  BadBoyLevels, v2.94
  BankStack, vv29
  Bartender4, v4.5.8
  BrokerAuditor, v4.4.2
  BrokerLFG, v5.1.0.48
  ButtonFacade, v5.0.389
  CallbackHandler10, v
  cBrokerRecount, v1.01
  CeaphyrelsAutoAcceptInvite, v1.2
  ChatLoot, v1.5
  Chatter, vv1.4.1
  ChocolateBar, vv2.3.3
  clcInfo, v
  CLCRet, v
  Clique, vv50100-1.0.0
  DXELoader, v
  eAlign, v
  ElkBuffBars, v2.3.2-169
  EnhancedColourPicker, v4
  FactionAddict, v1.09
  FBBroker, v1.19f
  FBMergeDatabase, v1.2d
  FBOutfitDisplayFrame, v1.2i
  FBTrackingFrame, v1.2h
  FishingBuddy, v1.2i
  FlightMap, v5.0.3
  FlyoutButtonCustom, v2.50
  fontain, v
  ForteCasting, v
  ForteClass, v
  ForteCooldown, v
  ForteCore, v1.980.8
  ForteHealthstone, v
  ForteSoulstone, v
  ForteSummon, v
  ForteTalent, v
  ForteTimer, v
  GupPet, v2.104
  GupPetButtonFacade, v0.2
  kgPanels, v1.14
  LibAbacus30, v
  LibAboutPanel, v1.6.0
  LibActionButton10, v
  LibDBIcon10, v
  LibDDI10, v
  LibDialog10, vr50-release
  LibDualSpec10, vv1.8
  LibKeyBound10, v
  LibMapData10, v1.0.0.27-release
  LibQTip10, vr154-release 
  LibQTipClick11, vr10 
  LibSharedMedia30, v3.0-74
  LibSink20, v
  LibStub, v
  LibWindow11, v1.1.10
  Mapster, v1.5.1
  Masque, v5.1.389
  MasqueCaith, v5.1.82
  MasqueDarion, v4.1.2
  MasqueOnyx, v5.1.76
  MasqueSerenity, v5.1.76
  MasqueSleek, v5.1.0
  MicroExperience, v40000.6
  MikScrollingBattleText, v5.7.125
  Misspelled, v1.5.09
  Omen, v3.1.8
  OmniCC, v5.1.3
  OneClickEnchantScroll, v9
  oRA3, v
  oUF, v1.6.1
  oUFExperience, v50001.13-Release
  oUFMovableFrames, v1.16
  oUFReputation, v50001.8-Release
  oUFSpellRange, v5.0.0.2
  oUFZulu, v1.0
  Outfitter, v5.7
  Overachiever, v0.70
  OverachieverTrade, v0.70
  PowerAuras, v5.0.0.P
  qMinimap, v
  Recount, v
  RepairBroker, v5.1.0
  rQuestWatchFrameMover, v1.0
  SharedMedia, v3.0.5-184
  SharedMediaAdditionalFonts, v1.0.13
  SharedMediaLib, v1.0
  shNameplates, v
  SimpleRaidTargetIcons, v1.21
  TipTac, v12.10.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.09.05
  TomTom, vv50100-1.0.2
  VuhDo, v3.25
  VuhDoOptions, v3.25
  WIM, v3.6.3
  WIMSkinSpartanUI, v
  XLoot, v0.91.7
  XLootGroup, vz15-repack-release
  XLootMaster, v0.82
  XLootMonitor, v0.72
  xMerchant, v120928
  ZOMGBuffs, vr217
  ZOMGBuffsBuffTehRaid, vr217
  ZOMGBuffsPortalz, vr217
  ZOMGBuffsSelfBuffs, vr217
  ZygorGuidesViewer, v4.0
  BlizRuntimeLib_enUS v5.1.0.50100 <us>
  (ck=a46)
I appreciate the help Seerah.
  Reply With Quote
01-15-13, 09:34 PM   #7
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
You didn't mention what is on line 620 in your file, but assuming it's from the code I posted, it's probably line 14 in there:

Code:
obj:SetPoint("TOPRIGHT", obj)
Change that to:

Code:
obj:SetPoint("TOPRIGHT", element)
I also updated my previous post to a link with revised code to fix both errors.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-15-13, 09:49 PM   #8
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Using the new updated code segment the following error occurs.

Code:
Date: 2013-01-15 21:41:31
ID: 1
Error occured in: Global
Count: 1
Message: ..\AddOns\oUF_Zulu\zulu.lua line 644:
   attempt to perform arithmetic on local 'm' (a nil value)
Debug:
   oUF_Zulu\zulu.lua:644: styleFunc()
   oUF\ouf.lua:262:
      oUF\ouf.lua:192
   (tail call): ?
   oUF\ouf.lua:552: Spawn()
   oUF_Zulu\zulu.lua:1098:
      oUF_Zulu\zulu.lua:1089
   oUF_Zulu\zulu.lua:1104: func()
   oUF\factory.lua:20:
      oUF\factory.lua:16
   (tail call): ?
Locals:
self = oUF_ZuluPlayer {
 0 = <userdata>
 MasterLooter = <unnamed> {
 }
 __tags = <table> {
 }
 UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\oUF\ouf.lua:38
 Leader = <unnamed> {
 }
 unit = "player"
 PhaseIcon = <unnamed> {
 }
 PvP = <unnamed> {
 }
 __elements = <table> {
 }
 FrameBackdrop = <unnamed> {
 }
 LFDRole = <unnamed> {
 }
 Power = <unnamed> {
 }
 Portrait = <unnamed> {
 }
 QuestIcon = <unnamed> {
 }
 Castbar = <unnamed> {
 }
 RaidIcon = <unnamed> {
 }
 Combat = <unnamed> {
 }
 PorBackdrop = <unnamed> {
 }
 menu = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:76
 PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:149
 AltPowerBar = <unnamed> {
 }
 Health = <unnamed> {
 }
 UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\oUF\ouf.lua:38
 style = "Zulu - Player"
}
_ = "Paladin"
class = "PALADIN"
GAP = 2
COUNT = 5
element = <unnamed> {
 0 = <userdata>
}
(for index) = 1
(for limit) = 5
(for step) = 1
i = 1
obj = <unnamed> {
 0 = <userdata>
 bg = <unnamed> {
 }
}
bg = <unnamed> {
 0 = <userdata>
 multiplier = 0.2
}
color = <table> {
 b = 0.6
 g = 0.9
 r = 0.95
}
r = 0.95
g = 0.9
b = 0.6
m = nil
(*temporary) = <function> defined =[C]:-1
(*temporary) = <unnamed> {
 0 = <userdata>
 multiplier = 0.2
}
(*temporary) = 0.95
(*temporary) = 0.9
(*temporary) = 0.6
(*temporary) = "attempt to perform arithmetic on local 'm' (a nil value)"
func = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:407
portraits = true
createBackdrop = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:117
createStatusbar = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:142
texture = "Interface\AddOns\oUF_Zulu\media\Cabaret"
updateEclipse = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:170
backdrop = <table> {
 insets = <table> {
 }
 bgFile = "Interface\ChatFrame\ChatFrameBackground"
}
createFont = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:158
font = "Interface\AddOns\oUF_Zulu\media\desyrel.ttf"
fontsize = 12
fontflag = "OUTLINE"
AltPower = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:184
overrideBlizzbuffs = false
auraIcon = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:244
PostUpdateIcon = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:280
playerauras = false
height = 31
width = 225
CustomFilter = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:306

AddOns:
  Swatter, v5.15.5383 (LikeableLyrebird)
  NPCScan, v5.0.0.5
  NPCScanOverlay, v5.0.0.3
  Ace3, v
  ACP, v3.4.1 
  AddonLoader, v2.0.1
  Archy, v1.8.39
  AtlasLootLoader, vv7.04.01
  Auditor2, v4.4.2
  BadBoy, v11.507
  BadBoyCCleaner, v3.62
  BadBoyLevels, v2.94
  BankStack, vv29
  Bartender4, v4.5.8
  BrokerAuditor, v4.4.2
  BrokerLFG, v5.1.0.48
  ButtonFacade, v5.0.389
  CallbackHandler10, v
  cBrokerRecount, v1.01
  CeaphyrelsAutoAcceptInvite, v1.2
  ChatLoot, v1.5
  Chatter, vv1.4.1
  ChocolateBar, vv2.3.3
  clcInfo, v
  CLCRet, v
  Clique, vv50100-1.0.0
  DXELoader, v
  eAlign, v
  ElkBuffBars, v2.3.2-169
  EnhancedColourPicker, v4
  FactionAddict, v1.09
  FBBroker, v1.19f
  FBMergeDatabase, v1.2d
  FBOutfitDisplayFrame, v1.2i
  FBTrackingFrame, v1.2h
  FishingBuddy, v1.2i
  FlightMap, v5.0.3
  FlyoutButtonCustom, v2.50
  fontain, v
  ForteCasting, v
  ForteClass, v
  ForteCooldown, v
  ForteCore, v1.980.8
  ForteHealthstone, v
  ForteSoulstone, v
  ForteSummon, v
  ForteTalent, v
  ForteTimer, v
  GupPet, v2.104
  GupPetButtonFacade, v0.2
  kgPanels, v1.14
  LibAbacus30, v
  LibAboutPanel, v1.6.0
  LibActionButton10, v
  LibDBIcon10, v
  LibDDI10, v
  LibDialog10, vr50-release
  LibDualSpec10, vv1.8
  LibKeyBound10, v
  LibMapData10, v1.0.0.27-release
  LibQTip10, vr154-release 
  LibQTipClick11, vr10 
  LibSharedMedia30, v3.0-74
  LibSink20, v
  LibStub, v
  LibWindow11, v1.1.10
  Mapster, v1.5.1
  Masque, v5.1.389
  MasqueCaith, v5.1.82
  MasqueDarion, v4.1.2
  MasqueOnyx, v5.1.76
  MasqueSerenity, v5.1.76
  MasqueSleek, v5.1.0
  MicroExperience, v40000.6
  MikScrollingBattleText, v5.7.125
  Misspelled, v1.5.09
  Omen, v3.1.8
  OmniCC, v5.1.3
  OneClickEnchantScroll, v9
  oRA3, v
  oUF, v1.6.1
  oUFExperience, v50001.13-Release
  oUFMovableFrames, v1.16
  oUFReputation, v50001.8-Release
  oUFSpellRange, v5.0.0.2
  oUFZulu, v1.0
  Outfitter, v5.7
  Overachiever, v0.70
  OverachieverTrade, v0.70
  PowerAuras, v5.0.0.P
  qMinimap, v
  Recount, v
  RepairBroker, v5.1.0
  rQuestWatchFrameMover, v1.0
  SharedMedia, v3.0.5-184
  SharedMediaAdditionalFonts, v1.0.13
  SharedMediaLib, v1.0
  shNameplates, v
  SimpleRaidTargetIcons, v1.21
  TipTac, v12.10.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.09.05
  TomTom, vv50100-1.0.2
  VuhDo, v3.25
  VuhDoOptions, v3.25
  WIM, v3.6.3
  WIMSkinSpartanUI, v
  XLoot, v0.91.7
  XLootGroup, vz15-repack-release
  XLootMaster, v0.82
  XLootMonitor, v0.72
  xMerchant, v120928
  ZOMGBuffs, vr217
  ZOMGBuffsBuffTehRaid, vr217
  ZOMGBuffsPortalz, vr217
  ZOMGBuffsSelfBuffs, vr217
  ZygorGuidesViewer, v4.0
  BlizRuntimeLib_enUS v5.1.0.50100 <us>
  (ck=a46)
I hope this is not proving too bothersome for you Phanx. I appreciate your time and help.

Here is a link to the entirety of the code without your changes. (Not sure if it would prove helpful.)

http://www.wowace.com/paste/6914/
  Reply With Quote
01-16-13, 04:29 PM   #9
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Obvious typo is obvious. >_<

http://www.wowace.com/paste/6920/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-16-13, 05:44 PM   #10
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
I hope this doesn't turn into some awful beast of a problem. Another error popped up (no unit frames are visible either).

Code:
Date: 2013-01-16 17:04:31
ID: 3
Error occured in: Global
Count: 1
Message: ..\AddOns\oUF\elements\classicons.lua line 70:
   attempt to index field '?' (a nil value)
Debug:
   oUF\elements\classicons.lua:70:
      oUF\elements\classicons.lua:67
   oUF\elements\classicons.lua:87: ?()
   oUF\events.lua:69:
      oUF\events.lua:62
Locals:
self = oUF_ZuluPlayer {
 0 = <userdata>
 UNIT_PORTRAIT_UPDATE = <function> defined @Interface\AddOns\oUF\elements\portraits.lua:75
 Combat = <unnamed> {
 }
 __tags = <table> {
 }
 PLAYER_ENTERING_WORLD = <function> defined @Interface\AddOns\oUF\ouf.lua:149
 Leader = <unnamed> {
 }
 UNIT_SPELLCAST_CHANNEL_START = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:256
 UNIT_SPELLCAST_INTERRUPTIBLE = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:190
 UNIT_CLASSIFICATION_CHANGED = <function> defined @Interface\AddOns\oUF\elements\qicon.lua:55
 PhaseIcon = <unnamed> {
 }
 UNIT_MAXHEALTH = <function> defined @Interface\AddOns\oUF\elements\health.lua:147
 __elements = <table> {
 }
 UNIT_POWER_FREQUENT = <function> defined @Interface\AddOns\oUF\elements\power.lua:191
 UNIT_SPELLCAST_NOT_INTERRUPTIBLE = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:204
 Castbar = <unnamed> {
 }
 UNIT_POWER_BAR_SHOW = <table> {
 }
 UPDATE_EXHAUSTION = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:56
 PLAYER_REGEN_DISABLED = <function> defined @Interface\AddOns\oUF\elements\combat.lua:52
 PARTY_LOOT_METHOD_CHANGED = <function> defined @Interface\AddOns\oUF\elements\masterlooter.lua:73
 UNIT_MAXPOWER = <function> defined @Interface\AddOns\oUF\elements\power.lua:191
 UNIT_DISPLAYPOWER = <table> {
 }
 Health = <unnamed> {
 }
 UNIT_HEALTH_FREQUENT = <function> defined @Interface\AddOns\oUF\elements\health.lua:147
 PLAYER_REGEN_ENABLED = <function> defined @Interface\AddOns\oUF\elements\combat.lua:52
 UNIT_SPELLCAST_CHANNEL_STOP = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:332
 UNIT_EXITED_VEHICLE = <function> defined @Interface\AddOns\oUF\ouf.lua:38
 UNIT_SPELLCAST_CHANNEL_UPDATE = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:309
 UNIT_CONNECTION = <table> {
 }
 UNIT_SPELLCAST_DELAYED = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:218
 Portrait = <unnamed> {
 }
 UNIT_POWER = <function> defined @Interface\AddOns\oUF\elements\classicons.lua:82
 UNIT_SPELLCAST_INTERRUPTED = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:172
 PLAYER_LEVEL_UP = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:56
 UNIT_SPELLCAST_START = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:104
 unit = "player"
 UNIT_PHASE = <function> defined @Interface\AddOns\oUF\elements\picon.lua:53
 UNIT_SPELLCAST_STOP = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:238
 UNIT_SPELLCAST_FAILED = <function> defined @Interface\AddOns\oUF\elements\castbar.lua:154
 PARTY_LEADER_CHANGED = <function> defined @Interface\AddOns\oUF\elements\leader.lua:53
 GROUP_ROSTER_UPDATE = <table> {
 }
 RaidIcon = <unnamed> {
 }
 PLAYER_ROLES_ASSIGNED = <function> defined @Interface\AddOns\oUF\elements\lfdrole.lua:57
 PLAYER_XP_UPDATE = <function> defined @Interface\AddOns\oUF_Experience\oUF_Experience.lua:56
 LFDRole = <unnamed> {
 }
 PvP = <unnamed> {
 }
 MasterLooter = <unnamed> {
 }
 UNIT_ENTERED_VEHICLE = <function> defined @Interface\AddOns\oUF\ouf.lua:38
 style = "Zulu - Player"
 QuestIcon = <unnamed> {
 }
 UNIT_FACTION = <table> {
 }
 Experience = <unnamed> {
 }
 FrameBackdrop = <unnamed> {
 }
 PorBackdrop = <unnamed> {
 }
 AltPowerBar = <unnamed> {
 }
 menu = <function> defined @Interface\AddOns\oUF_Zulu\zulu.lua:76
 Power = <unnamed> {
 }
 UNIT_POWER_BAR_HIDE = <table> {
 }
 ClassIcons = <unnamed> {
 }
 UNIT_MODEL_CHANGED = <function> defined @Interface\AddOns\oUF\elements\portraits.lua:75
}
state = false
element = <unnamed> {
 0 = <userdata>
 ForceUpdate = <function> defined @Interface\AddOns\oUF\elements\classicons.lua:147
 __owner = oUF_ZuluPlayer {
 }
 __max = 0
 __inVehicle = false
}
(for index) = 1
(for limit) = 5
(for step) = 1
i = 1
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index field '?' (a nil value)"
UpdateTexture = <function> defined @Interface\AddOns\oUF\elements\classicons.lua:43
ClassPowerDisable = <function> defined @Interface\AddOns\oUF\elements\classicons.lua:183
ClassPowerEnabl
AddOns:
  Swatter, v5.15.5383 (LikeableLyrebird)
  NPCScan, v5.0.0.5
  NPCScanOverlay, v5.0.0.3
  Ace3, v
  ACP, v3.4.1 
  AddonLoader, v2.0.1
  AraBrokerGuildFriends, vr56
  Archy, v1.8.39
  ArkInventory, v30325
  ArkInventoryRules, v
  AtlasLootLoader, vv7.04.01
  Auditor2, v4.4.2
  BadBoy, v11.507
  BadBoyCCleaner, v3.62
  BadBoyLevels, v2.94
  BankStack, vv29
  Bartender4, v4.5.8
  BrokerAuditor, v4.4.2
  BrokerGarbage, v5.1v1release-8-gfccc157
  BrokerGarbageLootManager, v5.1v1release-8-gfccc157
  BrokerLFG, v5.1.0.48
  ButtonFacade, v5.0.389
  CallbackHandler10, v
  cBrokerRecount, v1.01
  CeaphyrelsAutoAcceptInvite, v1.2
  ChatLoot, v1.5
  Chatter, vv1.4.1
  ChocolateBar, vv2.3.3
  clcInfo, v
  CLCRet, v
  Clique, vv50100-1.0.0
  DXELoader, v
  eAlign, v
  ElkBuffBars, v2.3.2-169
  EnhancedColourPicker, v4
  FactionAddict, v1.09
  FBBroker, v1.19f
  FBMergeDatabase, v1.2d
  FBOutfitDisplayFrame, v1.2i
  FBTrackingFrame, v1.2h
  FishingBuddy, v1.2i
  FlightMap, v5.0.3
  FlyoutButtonCustom, v2.50
  fontain, v
  ForteCasting, v
  ForteClass, v
  ForteCooldown, v
  ForteCore, v1.980.8
  ForteHealthstone, v
  ForteSoulstone, v
  ForteSummon, v
  ForteTalent, v
  ForteTimer, v
  GupPet, v2.104
  GupPetButtonFacade, v0.2
  kgPanels, v1.14
  LibAbacus30, v
  LibAboutPanel, v1.6.0
  LibActionButton10, v
  LibDBIcon10, v
  LibDDI10, v
  LibDialog10, vr50-release
  LibDualSpec10, vv1.8
  LibKeyBound10, v
  LibMapData10, v1.0.0.27-release
  LibPeriodicTable31, vv3.3.0.425
  LibQTip10, vr154-release 
  LibQTipClick11, vr10 
  LibSharedMedia30, v3.0-74
  LibSink20, v
  LibStub, v
  LibWindow11, v1.1.10
  LoggerHead, v162
  Mapster, v1.5.1
  Masque, v5.1.389
  MasqueCaith, v5.1.82
  MasqueDarion, v4.1.2
  MasqueOnyx, v5.1.76
  MasqueSerenity, v5.1.76
  MasqueSleek, v5.1.0
  MicroExperience, v40000.6
  MikScrollingBattleText, v5.7.125
  Misspelled, v1.5.09
  Omen, v3.1.8
  OmniCC, v5.1.3
  OneClickEnchantScroll, v9
  oRA3, v
  oUF, v1.6.1
  oUFExperience, v50001.13-Release
  oUFMovableFrames, v1.16
  oUFReputation, v50001.8-Release
  oUFSpellRange, v5.0.0.2
  oUFZulu, v1.0
  Outfitter, v5.7
  Overachiever, v0.70
  OverachieverTrade, v0.70
  PowerAuras, v5.0.0.P
  qMinimap, v
  Recount, v
  RepairBroker, v5.1.0
  rQuestWatchFrameMover, v1.0
  SharedMedia, v3.0.5-184
  SharedMediaAdditionalFonts, v1.0.13
  SharedMediaLib, v1.0
  shNameplates, v
  SimpleRaidTargetIcons, v1.21
  TipTac, v12.10.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.09.05
  TomTom, vv50100-1.0.2
  VuhDo, v3.25
  VuhDoOptions, v3.25
  WIM, v3.6.3
  WIMSkinSpartanUI, v
  XLoot, v0.91.7
  XLootGroup, vz15-repack-release
  XLootMaster, v0.82
  XLootMonitor, v0.72
  xMerchant, v120928
  ZOMGBuffs, vr217
  ZOMGBuffsBuffTehRaid, vr217
  ZOMGBuffsPortalz, vr217
  ZOMGBuffsSelfBuffs, vr217
  ZygorGuidesViewer, v4.0
  BlizRuntimeLib_enUS v5.1.0.50100 <us>
  (ck=b26)
  Reply With Quote
01-16-13, 05:52 PM   #11
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
http://www.wowace.com/paste/6921/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-16-13, 07:11 PM   #12
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
I feel just awful every time I post a new error message. Thanks again Phanx.

Code:
Date: 2013-01-16 19:07:11
ID: 2
Error occured in: Global
Count: 2
Message: ..\AddOns\oUF\elements\classicons.lua line 63:
   attempt to call method 'SetVertexColor' (a nil value)
Debug:
   oUF\elements\classicons.lua:63:
      oUF\elements\classicons.lua:43
   oUF\elements\classicons.lua:250: enable()
   oUF\ouf.lua:99: EnableElement()
   oUF\ouf.lua:269:
      oUF\ouf.lua:192
   (tail call): ?
   oUF\ouf.lua:552: Spawn()
   oUF_Zulu\zulu.lua:1100:
      oUF_Zulu\zulu.lua:1091
   oUF_Zulu\zulu.lua:1106: func()
   oUF\factory.lua:20:
      oUF\factory.lua:16
   (tail call): ?
Locals:
element = <unnamed> {
 1 = <unnamed> {
 }
 2 = <unnamed> {
 }
 3 = <unnamed> {
 }
 4 = <unnamed> {
 }
 5 = <unnamed> {
 }
 __owner = oUF_ZuluPlayer {
 }
 ForceUpdate = <function> defined @Interface\AddOns\oUF\elements\classicons.lua:147
 __max = 0
 0 = <userdata>
}
red = 1
green = 0.96
blue = 0.41
desaturated = true
(for index) = 1
(for limit) = 5
(for step) = 1
i = 1
(*temporary) = nil
(*temporary) = <unnamed> {
 0 = <userdata>
 bd = <unnamed> {
 }
 bg = <unnamed> {
 }
}
(*temporary) = 1
(*temporary) = 0.96
(*temporary) = 0.41
(*temporary) = "attempt to call method 'SetVertexColor' (a nil value)"
PlayerClass = "PALADIN"

AddOns:
  Swatter, v5.15.5383 (LikeableLyrebird)
  NPCScan, v5.0.0.5
  NPCScanOverlay, v5.0.0.3
  Ace3, v
  ACP, v3.4.1 
  AddonLoader, v2.0.1
  Archy, v1.8.39
  AtlasLootLoader, vv7.04.01
  Auditor2, v4.4.2
  BadBoy, v11.507
  BadBoyCCleaner, v3.62
  BadBoyLevels, v2.94
  BankStack, vv29
  Bartender4, v4.5.8
  BrokerAuditor, v4.4.2
  BrokerLFG, v5.1.0.48
  ButtonFacade, v5.0.389
  CallbackHandler10, v
  cBrokerRecount, v1.01
  CeaphyrelsAutoAcceptInvite, v1.2
  ChatLoot, v1.5
  Chatter, vv1.4.1
  ChocolateBar, vv2.3.3
  clcInfo, v
  CLCRet, v
  Clique, vv50100-1.0.0
  DXELoader, v
  eAlign, v
  ElkBuffBars, v2.3.2-169
  EnhancedColourPicker, v4
  FactionAddict, v1.09
  FBBroker, v1.19f
  FBMergeDatabase, v1.2d
  FBOutfitDisplayFrame, v1.2i
  FBTrackingFrame, v1.2h
  FishingBuddy, v1.2i
  FlightMap, v5.0.3
  FlyoutButtonCustom, v2.50
  fontain, v
  ForteCasting, v
  ForteClass, v
  ForteCooldown, v
  ForteCore, v1.980.8
  ForteHealthstone, v
  ForteSoulstone, v
  ForteSummon, v
  ForteTalent, v
  ForteTimer, v
  GupPet, v2.104
  GupPetButtonFacade, v0.2
  kgPanels, v1.14
  LibAbacus30, v
  LibAboutPanel, v1.6.0
  LibActionButton10, v
  LibDBIcon10, v
  LibDDI10, v
  LibDialog10, vr50-release
  LibDualSpec10, vv1.8
  LibKeyBound10, v
  LibMapData10, v1.0.0.27-release
  LibQTip10, vr154-release 
  LibQTipClick11, vr10 
  LibSharedMedia30, v3.0-74
  LibSink20, v
  LibStub, v
  LibWindow11, v1.1.10
  Mapster, v1.5.1
  Masque, v5.1.389
  MasqueCaith, v5.1.82
  MasqueDarion, v4.1.2
  MasqueOnyx, v5.1.76
  MasqueSerenity, v5.1.76
  MasqueSleek, v5.1.0
  MicroExperience, v40000.6
  MikScrollingBattleText, v5.7.125
  Misspelled, v1.5.09
  Omen, v3.1.8
  OmniCC, v5.1.3
  OneClickEnchantScroll, v9
  oRA3, v
  oUF, v1.6.1
  oUFExperience, v50001.13-Release
  oUFMovableFrames, v1.16
  oUFReputation, v50001.8-Release
  oUFSpellRange, v5.0.0.2
  oUFZulu, v1.0
  Outfitter, v5.7
  Overachiever, v0.70
  OverachieverTrade, v0.70
  PowerAuras, v5.0.0.P
  qMinimap, v
  Recount, v
  RepairBroker, v5.1.0
  rQuestWatchFrameMover, v1.0
  SharedMedia, v3.0.5-184
  SharedMediaAdditionalFonts, v1.0.13
  SharedMediaLib, v1.0
  shNameplates, v
  SimpleRaidTargetIcons, v1.21
  TipTac, v12.10.30
  TipTacItemRef, v12.08.30
  TipTacTalents, v12.09.05
  TomTom, vv50100-1.0.2
  VuhDo, v3.25
  VuhDoOptions, v3.25
  WIM, v3.6.3
  WIMSkinSpartanUI, v
  XLoot, v0.91.7
  XLootGroup, vz15-repack-release
  XLootMaster, v0.82
  XLootMonitor, v0.72
  xMerchant, v120928
  ZOMGBuffs, vr217
  ZOMGBuffsBuffTehRaid, vr217
  ZOMGBuffsPortalz, vr217
  ZOMGBuffsSelfBuffs, vr217
  ZygorGuidesViewer, v4.0
  BlizRuntimeLib_enUS v5.1.0.50100 <us>
  (ck=a46)
  Reply With Quote
01-16-13, 09:56 PM   #13
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
http://www.wowace.com/paste/6922/
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
01-16-13, 11:10 PM   #14
Solarin
A Deviate Faerie Dragon
Join Date: Jan 2006
Posts: 13
Woot! No errors! I'll have to play with the sizing, but it works perfectly and the color is precisely what I wanted. Thank you so very much Phanx!



If I wanted the frame to show permanently and have the bars light up as I gained the resource (the bars would be the current color but much darker), would that be a complicated process? Ultimately, I am looking to have all the bars have a border around them like that third picture I posted. Do you know a place you can point me to so I can try my hand with playing with it?

You've been such a huge help!

Last edited by Solarin : 01-16-13 at 11:16 PM.
  Reply With Quote
01-17-13, 10:28 PM   #15
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Look at the orbs in oUF_Phanx. Basically I hijack the native methods oUF calls to do other things, like hide child textures, change alpha, etc. on each "icon". Basic orb creation happens in Orbs.lua. Orbs are generated for oUF elements like ClassIcons in Frames.lua, and functions in Core.lua handle some specific "translation" between oUF (eg. PostUpdate) and Orbs.lua.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » oUF help: Power Bars and Such


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