1. #1

    WA Custom Text on a Progress Bar

    I just recently got Majordomo's Dinner Bell, and I've been trying to set up a custom function to display the stat that gets buffed in the Left Text position of the bar I have for it. However, when I activate the trinket, the left text remains blank no matter what I try. I'm completely new to lua programming, so any help would be appreciated. The code runs, but I'm sure I have plenty of mistakes that are making my function not work.

    Code:
    function()
        
        local SpellID = (select(11, unitaura("Player", "Quite Satisfied")))
        
        if
        SpellID == 230102
        then
            return("Quite Satisfied - Crit")
            
        elseif 
        SpellID == 230103
        then
            return("Quite Satisfied - Haste")
            
        elseif
        SpellID == 230104
        then
            return("Quite Satisfied - Mastery")
            
        elseif
        SpellID == 230105
        then
            return("Quite Satisfied - Vers")
        end
        
    end

  2. #2
    Deleted
    Lua is case sensitive, so "unitaura" is not the same as "UnitAura", which would be the function you want to use.
    Other than that, I can't spot any real issues. You could get rid of the parentheses after the return statements since they're superfluous - but this doesn't impair the functionality of your code.

  3. #3
    Thank you so much. It works exactly like I want it now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •