RepByZone

RepByZone

144k Downloads

[BUG] nextThreshold is nil in GetMultiRepIDsForZones

lucasvienna opened this issue ยท 4 comments

commented

I've been getting this error lately:

1x RepByZone/Core-Retail.lua:447: attempt to perform arithmetic on field 'nextThreshold' (a nil value)
[string "@RepByZone/Core-Retail.lua"]:447: in function `GetMultiRepIDsForZones'
[string "@RepByZone/Core-Retail.lua"]:374: in function `?'
[string "@Scrap/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:119: in function <...rap/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Scrap/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:29: in function <...rap/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:25>
[string "@Scrap/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:64: in function `Fire'
[string "@Scrap/libs/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <...faceScrap/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self = <table> {
 SetDefaultModuleLibraries = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:363
 AboutOptionsTable = <function> defined @RepByZone/Libs/LibAboutPanel-2.0/LibAboutPanel-2.0.lua:518
 CheckTaxi = <function> defined @RepByZone/Core-Retail.lua:362
 EnableModule = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:328
 CloseAllFactionHeaders = <function> defined @RepByZone/Core-Retail.lua:517
 SwitchedZones = <function> defined @RepByZone/Core-Retail.lua:558
 IterateEmbeds = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:438
 GetPandarenRep = <function> defined @RepByZone/Core-Retail.lua:396
 covenantRepID = 2413
 Printf = <function> defined @AdiBags/libs/AceConsole-3.0/AceConsole-3.0.lua:65
 SetDefaultModulePrototype = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:405
 defaultModuleState = true
 IsEnabled = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:447
 GetRacialRep = <function> defined @RepByZone/Core-Retail.lua:89
 DisableModule = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:346
 GetCovenantRep = <function> defined @RepByZone/Core-Retail.lua:387
 RegisterMessage = <function> defined @Scrap/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90
 GetArgs = <function> defined @AdiBags/libs/AceConsole-3.0/AceConsole-3.0.lua:140
 db = <table> { }
 SetEnabledState = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:420
 enabledState = true
 RegisterEvent = <function> defined @Scrap/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:90
 SlashHandler = <function> defined @RepByZone/Core-Retail.lua:331
 OpenAllFactionHeaders = <function> defined @RepByZone/Core-Retail.lua:501
 IterateModules = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:433
 InstancesAndFactionList = <function> defined @RepByZone/InstanceData-Retail.lua:6
 InCombat = <function> defined @RepByZone/Core-Retail.lua:351
 GetMultiRepIDsForZones = <function> defined @RepByZone/Core-Retail.lua:425
 OnInitialize = <function> defined @RepByZone/Core-Retail.lua:235
 NewModule = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:231
 SubZonesAndFactions = <function> defined @RepByZone/Data-Retail.lua:250
 GetModule = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:206
 defaultModuleLibraries = <table> { }
 optionsFrame = Frame { }
 GetTabardID = <function> defined @RepByZone/Core-Retail.lua:466
 GetTabardBuffData = <function> defined @RepByZone/Core-Retail.lua:476
 GetName = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:275
 GetOptions = <function> defined @RepByZone/Options-Retail.lua:4
 name = "RepByZone"
 orderedModules = <table> { }
 Disable = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:310
 RefreshConfig = <function> defined @RepByZone/Core-Retail.lua:345
 Print = <function> defined @AdiBags/libs/AceConsole-3.0/AceConsole-3.0.lua:50
 racialRepName = "Silvermoon City"
 LoginReload = <function> defined @RepByZone/Core-Retail.lua:367
 IsModule = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:464
 CreateAboutPanel = <function> defined @RepByZone/Libs/LibAboutPanel-2.0/LibAboutPanel-2.0.lua:423
 SendMessage = <function> defined @Scrap/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:59
 Enable = <function> defined @AdiBags/libs/AceAddon-3.0/AceAddon-3.0.lua:290
[...]

Latest addon version, happens even with only this ang BugSack/Grabber active.

commented

I did a bit of digging, and lines 447 and 449 are indeed causing it.

The API being called no longer returns a nextThreshold if you're maxed, and the % operand is taking priority over the or 0, it seems.

commented

I'm looking into this and found that RBZ isn't even switching when I go to the Obsidian Throne.

commented

Thank you for posting this bug report, even if I prefer bug reports on Curseforge. Because of this bug, I discovered another bug with a similar result. The next release will contain the fixes.

commented

Glad to see this fixed, thank you! I'll remember to submit bugs in CF in the future :)