UNIT_AURA Lua Texts question (Pitbull)

I’m using Pitbull for unit frames, as well as Pitbull AuraBar. I’ve got it configured to display my HoTs on the unit frames when they are present.

What I’d like to do is also display on the bar the name of the HoT and the time remaining – ideally, with the icon, as well. (Something like what the Add-on “ClassTimer” does.)

The Pitbull AuraBar add-on hasn’t been updated in some time, but the author mentions this snippet when someone asked them a similar question to mine:

if HasAura(“Lifebloom”) then
AuraDuration(“Lifebloom”):Round
end

However, this is returning an error for me.

:3: function arguments expected near ‘end’

Can anyone help me determine what is wrong here? I have a feeling this is a simple syntax change that I didn’t learn about…

You’ve got smart quotes in your code

if HasAura("Lifebloom") then
AuraDuration("Lifebloom"):Round
end

I think that’s just a screen artifact in the browser. When typing in the game, I don’t think there is such a thing as smart quotes. Still throws the same error about expecting function arguments :-/

Does it work if you remove :Round?

No, I tried that, too. Still no good. Thanks for the ideas, though.

AuraDuration("Lifebloom"):Round()

I don’t know if anything is expected inside the ().

Ah, good idea! However, now it returns a different error.

1: attempt to call global ‘HasAura’ (a nil value)

It’s not a lua or WoW API function so if it is not a Pitbull function, you will get an error.

1 Like

Looks like it’s Pitbull’s DogTag Lib…
https://wowace.gamepedia.com/LibDogTag-3.0

[if HasAura("Lifebloom") then AuraDuration("Lifebloom"):Round end]
2 Likes

Aha - that makes more sense, now. Pitbull uses Lua Texts:

wowace . com/projects/pitbull-unit-frames-4-0/pages/lua-texts

But in the past it did support DogTags. Though I think DogTags are no longer functioning - is that right? Deprecated, if I recall.

So, the code snippet won’t work in the Lua Texts as I understand it. Looks like I’ll need to try to figure out how to work this another way. Thanks for the tips, all

Can just wrap your links in code tags to post them:
https://www.wowace.com/projects/pitbull-unit-frames-4-0/pages/lua-texts

1 Like