sylvanaar / prat-3-0

Prat-3.0 is a chat enhancement addon for world of warcraft
https://www.curseforge.com/wow/addons/prat-3-0
GNU General Public License v3.0
25 stars 45 forks source link

Battle.net messages throwing error #216

Open jasonb4610 opened 3 years ago

jasonb4610 commented 3 years ago

Seems to be consistent for all incoming and outgoing battle net messages. Full stack trace included below.

Message: Interface\AddOns\Prat-3.0\modules\PlayerNames.lua:1262: attempt to index global 'C_BattleNet' (a nil value)
Time: Wed May 19 13:05:06 2021
Count: 13
Stack: Interface\AddOns\Prat-3.0\modules\PlayerNames.lua:1262: attempt to index global 'C_BattleNet' (a nil value)
[string "@Interface\AddOns\Prat-3.0\modules\PlayerNames.lua"]:1262: in function <Interface\AddOns\Prat-3.0\modules\PlayerNames.lua:1259>
[string "@Interface\AddOns\Prat-3.0\modules\PlayerNames.lua"]:1627: in function `FormatPlayer'
[string "@Interface\AddOns\Prat-3.0\modules\PlayerNames.lua"]:1744: in function `?'
[string "@Interface\AddOns\AtlasLootClassic\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:119: in function <...sic\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:119>
[string "=[C]"]: ?
[string "@Interface\AddOns\AtlasLootClassic\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:29: in function <...sic\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua:25>
[string "@Interface\AddOns\AtlasLootClassic\Libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"]:64: in function `Fire'
[string "@Interface\AddOns\Prat-3.0\addon\addon.lua"]:673: in function <Interface\AddOns\Prat-3.0\addon\addon.lua:613>
[string "=(tail call)"]: ?
[string "@Interface\FrameXML\ChatFrame.lua"]:2930: in function `ChatFrame_OnEvent'
[string "*:OnEvent"]:1: in function <[string "*:OnEvent"]:1>

I added some simple code to suppress the message but I doubt it is the correct fix. Putting

if not C_BattleNet then return end

seems to suppress the message

Maas1337 commented 3 years ago

same here