GameMenuButton Error
spar7453 opened this issue ยท 2 comments
Description
What is the issue about?
If specialization is not chosen then game menu returns the following erorr
Lua error
Message: .../AddOns/ElvUI_ToxiUI/Modules/Misc/GameMenuButton.lua:152: bad argument #2 to 'format' (string expected, got nil)
Time: Mon Aug 19 21:50:12 2024
Count: 1
Stack: .../AddOns/ElvUI_ToxiUI/Modules/Misc/GameMenuButton.lua:152: bad argument #2 to 'format' (string expected, got nil)
[string "@Interface/AddOns/ElvUI_ToxiUI/Modules/Misc/GameMenuButton.lua"]:152: in function <.../AddOns/ElvUI_ToxiUI/Modules/Misc/GameMenuButton.lua:137>
[string "=(tail call)"]: ?
[string "=[C]"]: ?
[string "=[C]"]: in function `Show'
[string "@Interface/AddOns/Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:493: in function `SetUIPanel'
[string "@Interface/AddOns/Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:295: in function `ShowUIPanel'
[string "@Interface/AddOns/Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:174: in function <...ParentPanelManager/Mainline/UIParentPanelManager.lua:169>
[string "=[C]"]: in function `SetAttribute'
[string "@Interface/AddOns/Blizzard_UIParentPanelManager/Mainline/UIParentPanelManager.lua"]:888: in function `ShowUIPanel'
[string "@Interface/AddOns/Blizzard_UIParent/Mainline/UIParent.lua"]:2873: in function `ToggleGameMenu'
[string "TOGGLEGAMEMENU"]:1: in function <[string "TOGGLEGAMEMENU"]:1>
ToxiUI Status Report
Type /tx status
in game and paste a screenshot of it here.
Screenshots
Screenshots often say more than words
To reproduce
If this issue is describing a bug, include some steps to reproduce the behavior
- Create new character and does not star Murloc Starting Zone
- Press ESC
I fixed the bug by adding the following line
if TXUI.IsRetail then
local className, classId = UnitClassBase("player")
local specIndex = GetSpecialization()
if specIndex == 5 then
specIcon = format(self:GetClassIconPath("ToxiClasses"), M.ClassIcons[className])
else
local id = GetSpecializationInfoForClassID(classId, specIndex)
if id and M.SpecIcons then specIcon = format(iconPath, M.SpecIcons[id]) end
end
else
Fixed in 5cacd85