Bagnon

Bagnon

132M Downloads

LUA error when loading up on classic

ssateneth opened this issue ยท 1 comments

commented

Which software were you running?

  • Addon version name: Bagnon-11.1.zip
  • Client used: [e.g. Vanilla 1.14.4, Retail PTR x.x.x, etc] Classic Season of Discovery 1.15.6

Have you read the changelog?
Mark if read. Marked, I read it

Please describe the bug.
LUA error on load up, but ONLY if I also have "outfitter" addon installed

Please describe how to reproduce it.
Run season of discovery client, install bagnon + "Outfitter (Retrofit)", load into the game, get error. If I comment out lines 47, 48, 50, and 51 of bagbrother\core\core.lua, the errors go away. Weirdly enough, Function Addon:OnEnable() on line 45 is never called UNLESS I am using Outfitter. The error doesnt mention outfitter either but enabling it causes the error to show.

Any Screenshots?
If applicable, please add screenshots to help explain your problem.

Error Logs are Important!
Message: bad argument #2 to '?' (Usage: local success = C_CVar.SetCVarBitfield(name, index, value [, scriptCVar]))
Time: Wed Feb 26 12:04:10 2025
Count: 1
Stack: bad argument #2 to '?' (Usage: local success = C_CVar.SetCVarBitfield(name, index, value [, scriptCVar]))
[string "@Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua"]:291: in function `TimeManager_LoadUI'
[string "@Interface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua"]:525: in function <...erface/AddOns/Blizzard_UIParent/Vanilla/UIParent.lua:494>

Locals:

commented

In BagBrother/core/core.lua, there are five five calls to SetCVarBitfield. In SOD, only one of the LE_FRAME_TUTORIAL_* variables exist (LE_FRAME_TUTORIAL_BAG_SLOTS_AUTHENTICATOR).

A check for the variable before attempting to set it will fix the issue.

Something like:

if LE_FRAME_TUTORIAL_EQUIP_REAGENT_BAG then
    C_CVar.SetCVarBitfield('closedInfoFrames', LE_FRAME_TUTORIAL_EQUIP_REAGENT_BAG, true)
end

Why it doesn't happen unless Outfitter is enabled, I don't know.