BM Monk stagger LUA error #2035


Open
  • hrafn86 created this issue Dec 18, 2023

    Receiving the following errors on my Brewmaster Monk. It's constantly ticking, so I've had to switch specs in the meantime.

     

    6563x ...ceShadowedUnitFrames/modules/monkstagger.lua:44: attempt to compare number with nil
    [string "@ShadowedUnitFrames/modules/monkstagger.lua"]:44: in function `Update'
    [string "@ShadowedUnitFrames/modules/monkstagger.lua"]:34: in function `?'
    [string "@ShadowedUnitFrames/modules/units.lua"]:36: in function `FullUpdate'
    [string "@ShadowedUnitFrames/modules/units.lua"]:375: in function `CheckUnitStatus'
    [string "@ShadowedUnitFrames/modules/units.lua"]:614: in function <ShadowedUnitFrames/modules/units.lua:440>
    [string "=[C]"]: in function `SetAttribute'
    [string "@ShadowedUnitFrames/modules/units.lua"]:964: in function `LoadUnit'
    [string "@ShadowedUnitFrames/modules/units.lua"]:1337: in function `InitializeFrame'
    [string "@ShadowedUnitFrames/ShadowedUnitFrames.lua"]:274: in function `LoadUnits'
    [string "@ShadowedUnitFrames/ShadowedUnitFrames.lua"]:86: in function `OnInitialize'
    [string "@ShadowedUnitFrames/ShadowedUnitFrames.lua"]:932: in function <...aceShadowedUnitFrames/ShadowedUnitFrames.lua:930>

    Locals:
    self = <table> {
    moduleClass = "MONK"
    moduleHasBar = true
    Update = <function> defined @ShadowedUnitFrames/modules/monkstagger.lua:37
    UpdateMinMax = <function> defined @ShadowedUnitFrames/modules/monkstagger.lua:30
    OnEnable = <function> defined @ShadowedUnitFrames/modules/monkstagger.lua:4
    OnLayoutApplied = <function> defined @ShadowedUnitFrames/modules/monkstagger.lua:24
    moduleKey = "staggerBar"
    moduleSpec = <table> {
    }
    moduleName = "Stagger bar"
    OnDisable = <function> defined @ShadowedUnitFrames/modules/monkstagger.lua:20
    }
    frame = SUFUnitplayer {
    vehicleUnit = "vehicle"
    OnEnter = <function> defined @ShadowedUnitFrames/modules/units.lua:670
    UnregisterAll = <function> defined @ShadowedUnitFrames/modules/units.lua:145
    OnBackdropLoaded = <function> defined @SharedXML/Backdrop.lua:152
    GetBackdropColor = <function> defined @SharedXML/Backdrop.lua:390
    powerBar = StatusBar {
    }
    disableRangeAlpha = true
    ClearBackdrop = <function> defined @SharedXML/Backdrop.lua:282
    unitType = "player"
    staggerBar = StatusBar {
    }
    highlight = Frame {
    }
    unitInitialized = true
    unit = "player"
    ReregisterUnitEvents = <function> defined @ShadowedUnitFrames/modules/units.lua:41
    SetupTextureCoordinates = <function> defined @SharedXML/Backdrop.lua:214
    HasBackdropInfo = <function> defined @SharedXML/Backdrop.lua:278
    RegisterUnitEvent = <function> defined @ShadowedUnitFrames/modules/units.lua:112
    fontStrings = <table> {
    }
    GetEdgeSize = <function> defined @SharedXML/Backdrop.lua:188
    TopEdge = Texture {
    }
    unitOwner = "player"
    fullUpdates = <table> {
    }
    UnregisterUpdateFunc = <function> defined @ShadowedUnitFrames/modules/units.lua:135
    fader = Frame {
    }
    combatText = Frame {
    }
    incHeal = StatusBar {
    }
    FullUpdate = <function> defined @ShadowedUnitFrames/modules/units.lua:33
    LeftEdge = Texture {
    }
    portrait = Texture {
    }
    registeredEvents = <table> {
    }
    UnitClassToken = <function> defined @ShadowedUnitFrames/modules/units.lua:685
    SetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:422
    RegisterNormalEvent = <function> defined @ShadowedUnitFrames/modules/units.lua:62
    SetVisibility = <function> defined @ShadowedUnitFrames/modules/units.lua:246
    topFrameLevel = 5
    ApplyBackdrop = <function> defined @SharedXML/Backdrop.lua:294
    SetBackdrop = <function> defined @SharedXML/Backdrop.lua:329
    GetBackdropBorderColor = <function> defined @SharedXML/Backdrop.lua:409
    GetBackdrop = <function> defined @SharedXML/Backdrop.lua:347
    SetRangeAlpha = <function> defined @ShadowedUnitFrames/modules/units.lua:179
    visibility = <table> {
    }
    isDead = false
    SetBorderBlendMode = <function> defined @SharedXML/Backdrop.lua:266
    unitGUID = "Player-113-0A217F0F"
    Center = Texture {
    }
    RightEdge = Texture {
    }
    BottomEdge = Texture {
    }
    unitRealType = "player"
    totemBar = Frame {
    }
    BottomRightCorner = Texture {
    }
    BottomLeftCorner = Texture {
    }
    highFrame = Frame {
    }
    backdropInfo = <table> {
    }
    OnBackdropSizeChanged = <function> defined @SharedXML/Backdrop.lua:182
    OnLeave = <function> defined @ShadowedUnitFrames/modules/units.lua:678
    SetBarColor = <function> defined @ShadowedUnitFrames/modules/units.lua:187
    comboPoints = Frame {
    }
    TopRightCorner = Texture {
    }
    TopLeftCorner = Texture {
    }
    0 = <userdata>
    portraitTexture = Texture {
    }
    healthBar = StatusBar {
    }
    altPowerBar = StatusBar {
    }
    UnregisterSingleEvent = <function> defined @ShadowedUnitFrames/modules/units.lua:95
    DisableRangeAlpha = <function> defined @ShadowedUnitFrames/modules/units.lua:171
    RegisterUpdateFunc = <function> defined @ShadowedUnitFrames/modules/units.lua:118
    SetBlockCo

  • AscariRogueGarona posted a comment Dec 27, 2023

    I'm having this same issue on my Monk.

    SUF v 4.4.6 Game version 10.1.5

    Is there a way to disable this feature from Brewmaster Monk?

    This is one of those addons I've had setup and used religiously for years across all of my characters. 

  • Maximusthemerciful posted a comment Dec 27, 2023

    Same issue.  Anyone know a temporary workaround fix?

  • gaborn57 added an attachment suf_brewmaster_issue_A.txt Jan 6, 2024

    suf brewmaster 1

  • gaborn57 added an attachment suf_brewmaster_issue_B.txt Jan 6, 2024

    suf brewmaster 2

  • gaborn57 posted a comment Jan 6, 2024

    hi, i have the same issue while leveling. Can't combine SUF & monk Brewmaster spec

    i've attached my errors to this issue

  • gaborn57 posted a comment Jan 6, 2024

    hi, i have the same issue while leveling. Can't combine SUF & monk Brewmaster spec

  • polyhydride posted a comment Jan 7, 2024

    This is a simple fix. Open the `modules/monkstagger.lua` that's causing the errors and find the `Stagger:Update` function on line 37.

    Change that function to the following:

     

     

    function Stagger:Update(frame)
            local stagger = UnitStagger(frame.unit)
            if( not stagger ) then return end

            -- Figure out how screwed they are
            local percent = stagger / frame.staggerBar.maxHealth
            local state
            if( percent < STAGGER_STATES.YELLOW.threshold ) then
                    state = "STAGGER_GREEN"
            elseif( percent < STAGGER_STATES.RED.threshold ) then
                    state = "STAGGER_YELLOW"
            else
                    state = "STAGGER_RED"
            end

            frame:SetBarColor("staggerBar", ShadowUF.db.profile.powerColors[state].r, ShadowUF.db.profile.powerColors[state].g, ShadowUF.db.profile.powerColors[state].b)
            frame.staggerBar:SetValue(stagger)
    end

     

    The difference here is in the `if` statement, which changes `STAGGER_YELLOW_TRANSITION` and `STAGGER_RED_TRANSITION` to `STAGGER_STATES.YELLOW.threshold` and `STAGGER_STATES.RED.threshold` respectively.

  • gaborn57 posted a comment Jan 7, 2024

    even by doing this i got

    Message: ...ce/AddOns/ShadowedUnitFrames/modules/monkstagger.lua:44: attempt to compare number with nil

     

    line 44 is

    if( percent < STAGGER_STATES.YELLOW.threshold ) then

     

  • polyhydride posted a comment Jan 7, 2024

     I'm not sure why that would be. It works fine here on current retail, where `/dump GetBuildInfo()` returns:

     

    [1]="10.2.0",
    [2]="52649",
    [3]="Dec 19 2023",
    [4]=100200,
    [5]="",
    [6]=" "

     

    Those `STAGGER_STATES` values are defined in the base UI at `Interface/FrameXML/MonkStaggerBar.lua`, and you should be able to view them in-game with `/dump STAGGER_STATES`.

  • gaborn57 posted a comment Jan 7, 2024

    i'm sorry & ashamed : it's working. I just forgot to restart my client :o

    Thanks a lot for your quick help


To post a comment, please login or register a new account.