FabysGames / mythicplustimer

GNU General Public License v3.0
4 stars 4 forks source link

Slash command #46

Open gaveer opened 12 hours ago

gaveer commented 12 hours ago

@fabysdev with reacnt update of the addon Initial update to WoW 11.0.0 https://github.com/FabysGames/mythicplustimer/commit/9568a0394cdba7bf53431ddf201ac0d85ade987d#diff-437dcbdcefbb257379ec6d95c6877f5f4feb823b3c5d920b643f9aeebcad7db0R561

Slash command was not updated for this fix . here a fix for slash command:

  if msg == "config" then
    if not category then
      return
    end

-    InterfaceOptionsFrame_OpenToCategory(category)
-    InterfaceOptionsFrame_OpenToCategory(category)
+    Settings.OpenToCategory(category:GetID())
    return
  end
gaveer commented 12 hours ago

here is the error without the fix when you do /mpt config

24x MythicPlusTimer/config.lua:600: attempt to call global 'InterfaceOptionsFrame_OpenToCategory' (a nil value)
[string "@MythicPlusTimer/config.lua"]:600: in function `?'
[string "@Blizzard_ChatFrameBase/Mainline/ChatFrame.lua"]:5479: in function `ChatEdit_ParseText'
[string "@Blizzard_ChatFrameBase/Mainline/ChatFrame.lua"]:5131: in function `ChatEdit_SendText'
[string "@Blizzard_ChatFrameBase/Mainline/ChatFrame.lua"]:5167: in function `ChatEdit_OnEnterPressed'
[string "*ChatFrame.xml:140_OnEnterPressed"]:1: in function <[string "*ChatFrame.xml:140_OnEnterPressed"]:1>
[string "=[C]"]: ?

Locals:
msg = "config"
(*temporary) = nil
(*temporary) = <table> {
 order = 63
 ID = "MythicPlusTimer"
 categorySet = 2
 name = "MythicPlusTimer"
 subcategories = <table> {
 }
}
(*temporary) = "attempt to call global 'InterfaceOptionsFrame_OpenToCategory' (a nil value)"
main = <table> {
 name = "main"
}
category = <table> {
 order = 63
 ID = "MythicPlusTimer"
 categorySet = 2
 name = "MythicPlusTimer"
 subcategories = <table> {
 }
}
addon = <table> {
}