Broker Anything

Broker Anything

35.2k Downloads

`Reputation.lua:191: attempt to index field '?' (a nil value)`

tflo opened this issue ยท 5 comments

commented

I'm seeing repeatedly this error:

2x BrokerAnything/modules/Reputation.lua:191: attempt to index field '?' (a nil value)
[string "@BrokerAnything/modules/Reputation.lua"]:191: in function `?'
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:119: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:29: in function <...ags/libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:25>
[string "@AdiBags/libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:64: in function `Fire'
[string "@DataStore/libs/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <DataStore/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Not sure what triggers it, I am not tracking any reputation. The module is completely empty in the DB:

    ["ReputationModule"] = {
    },

โ€“ Tom

commented

have the same issue

[string "@BrokerAnything/modules/Reputation.lua"]:191: in function `?'
[string "@Masque/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:109: in function <...que/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:109>
[string "=[C]"]: ?
[string "@Masque/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:19: in function <...que/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:15>
[string "@Masque/Libs/CallbackHandler-1.0-8/CallbackHandler-1.0.lua"]:54: in function `Fire'
[string "@AutoTurnIn/libs/AceEvent-3.0-4/AceEvent-3.0.lua"]:120: in function <AutoTurnIn/libs/AceEvent-3.0/AceEvent-3.0.lua:119>

Locals:
self = <table> {
 SetDefaultModuleLibraries = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:363
 Enable = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:290
 UnregisterAllEvents = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
 GetRepInfo = <function> defined @BrokerAnything/modules/Reputation.lua:415
 EnableModule = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:328
 modules = <table> {
 }
 GetModule = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:206
 IterateEmbeds = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:438
 defaultModuleLibraries = <table> {
 }
 SetDefaultModulePrototype = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:405
 GetButtonText = <function> defined @BrokerAnything/modules/Reputation.lua:441
 name = "BrokerAnything_ReputationModule"
 IsEnabled = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:447
 orderedModules = <table> {
 }
 GetStandardizeValues = <function> defined @BrokerAnything/modules/Reputation.lua:368
 DisableModule = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:346
 AddBroker = <function> defined @BrokerAnything/modules/Reputation.lua:204
 baseName = "BrokerAnything"
 RemoveBroker = <function> defined @BrokerAnything/modules/Reputation.lua:561
 RemoveOption = <function> defined @BrokerAnything/modules/Reputation.lua:556
 RegisterMessage = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 UnregisterMessage = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
 AddOption = <function> defined @BrokerAnything/modules/Reputation.lua:529
 UpdateBroker = <function> defined @BrokerAnything/modules/Reputation.lua:70
 GetOptions = <function> defined @BrokerAnything/modules/Reputation.lua:525
 GetSessionBalanceMajorFaction = <function> defined @BrokerAnything/modules/Reputation.lua:342
 GetSessionBalanceRep = <function> defined @BrokerAnything/modules/Reputation.lua:332
 IsModule = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:213
 db = <table> {
 }
 SetDefaultModuleState = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:383
 MAJOR_FACTION_RENOWN_LEVEL_CHANGED = <function> defined @BrokerAnything/modules/Reputation.lua:189
 RefreshDb = <function> defined @BrokerAnything/modules/Reputation.lua:173
 SetEnabledState = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:420
 brokers = <table> {
 }
 enabledState = true
 UPDATE_FACTION = <function> defined @BrokerAnything/modules/Reputation.lua:185
 RegisterEvent = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:80
 UnregisterAllMessages = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:164
 OnEnable = <function> defined @BrokerAnything/modules/Reputation.lua:153
 brokerTitle = "Reputation"
 NewModule = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:231
 IterateModules = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:433
 defaultModuleState = true
 SendMessage = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:49
 GetName = <function> defined @Masque/Libs/AceAddon-3.0/AceAddon-3.0.lua:275
 moduleName = "ReputationModule"
 UnregisterEvent = <function> defined @Masque/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua:143
 Disable = <function> defined @Masque/Libs/AceAddon-3.0/AceA```
commented

i think adding this check on line 190 should fix it:

	if not brokers[factionId] then
		return
	end
commented

Sorry for the late reply, I was on vacation ๐Ÿ˜Ž.
I'll try to release a fix this night.

Thanks!

commented

Fixed by 5e83ced

commented

Thank you very much.