smaitch / Grail

World of Warcraft addon to provide a database of quest information.
31 stars 20 forks source link

bad argument #1 to '?' (Usage: local info = C_QuestLog.GetQuestTagInfo(questID)) #365

Open yoshimo opened 2 weeks ago

yoshimo commented 2 weeks ago
4x bad argument #1 to '?' (Usage: local info = C_QuestLog.GetQuestTagInfo(questID))
[string "=[C]"]: in function `GetQuestTagInfo'
[string "@Grail/Grail.lua"]:7942: in function `GetQuestTagInfo'
[string "@Grail/Grail.lua"]:4056: in function `_AddWorldQuests'
[string "@Grail/Grail.lua"]:2319: in function `?'
[string "@Grail/Grail.lua"]:12641: in function `_Tooltip_OnEvent'
[string "@Grail/Grail.lua"]:13569: in function <Grail/Grail.lua:13569>

Locals:
(*temporary) = "bad argument #1 to '?' (Usage: local info = C_QuestLog.GetQuestTagInfo(questID))"

still looking into it

smaitch commented 2 weeks ago

If you are running in the 11.0.5 PTR then I believe I have a fix for this.

diff --git a/Grail/Grail.lua b/Grail/Grail.lua
index 917e167..a7b5b41 100644
--- a/Grail/Grail.lua
+++ b/Grail/Grail.lua
@@ -4050,6 +4050,10 @@ end,
                                local tasks = C_TaskQuest.GetQuestsForPlayerByMapID(mapId)
                                if nil ~= tasks and 0 < #tasks then
                                        for k,v in ipairs(tasks) do
+                                               -- In 11.0.5 the questId is now questID so an adjustment is made here.
+                                               if nil == v.questId then
+                                                       v.questId = v.questID
+                                               end
                                                if self.GDE.debug then
                                                        local tagID, tagName, worldQuestType, rarity, isElite, tradeskillLineIndex = self:GetQuestTagInfo(v.questId)
                                                        if tagID and ((nil == self._LearnedWorldQuestProfessionMapping[tagID] and nil == self._LearnedWorldQuestTypeMapping[tagID]) or self.GDE.worldquestforcing) then
yoshimo commented 2 weeks ago

indeed i was. Might not be needed once it goes life. Blizzards Interface errors too so i guess it is an oversight on their end.