Quantcast
WoWInterface - View Single Post - oUF_AuraBars
Thread: oUF_AuraBars
View Single Post
09-18-12, 02:54 PM   #12
sirann
A Flamescale Wyrmkin
Join Date: Mar 2007
Posts: 142
I'm pretty sure you're going to hate me..

I c/p'd the code from your link /6263. Here's my file of it: http://pastebin.com/53q2b56C

I put this code into my oUF_Skaarj layout target function: http://pastebin.com/5BQKvyGL

I received this error
Code:
Message: Interface\AddOns\oUF_Skaarj\layout.lua:288: attempt to index global 'frame' (a nil value)
So I changed the code I put into my oUF_Skaarj layout target function to this: http://pastebin.com/kTTfUHDn
(basically just changed all the frame to self, except for the frame inside of the filterFunc.)

I then received this error:
Code:
Message: Interface\AddOns\oUF_AuraBars\oUF_AuraBars.lua:279: attempt to compare number with nil
which is from
Lua Code:
  1. bar.name:SetText(aura.count > 1 and format("%s [%d]", aura.name, aura.count) or aura.name)

So I realized that count must be setting to nil if the buff/debuff doesn't have a stack, ie something like a mount.

So I changed the code from
Lua Code:
  1. bar.icon:SetTexture(aura.icon)
  2. bar.name:SetText(aura.count > 1 and format("%s [%d]", aura.name, aura.count) or aura.name)

to this

Lua Code:
  1. if aura.count == nil then
  2.     aura.count = 0
  3. end
  4.        
  5. bar.icon:SetTexture(aura.icon)
  6. bar.name:SetText(aura.count > 1 and format("%s [%d]", aura.name, aura.count) or aura.name)

And now I receive this error:
Code:
Message: Interface\AddOns\oUF_AuraBars\oUF_AuraBars.lua:292: Usage: <unnamed>:SetMinMaxValues(min, max)
which is from
Lua Code:
  1. if aura.duration == 0 then
  2.     bar.duration, bar.expirationTime = nil, nil
  3.     bar:SetMinMaxValues(0, 1)
  4.     bar:SetValue(1)
  5.     bar.time:SetText(nil)
  6. else
  7.     bar.duration, bar.expirationTime = aura.duration, aura.expirationTime
  8. ->  bar:SetMinMaxValues(0, aura.duration)
  9.     -- No need to set the value or time text here; the OnUpdate will do it.
  10.     numAurasWithDuration = numAurasWithDuration + 1
  11. end

Last edited by sirann : 09-18-12 at 03:00 PM.
  Reply With Quote