Quantcast
WoWInterface - View Single Post - Bug in GetAchievementCriteriaInfo (8.1.0.28485 PTR)
View Single Post
11-29-18, 03:54 PM   #1
MuffinManKen
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 102
Bug in GetAchievementCriteriaInfo (8.1.0.28485 PTR)

GetAchievementNumCriteria(341) returns 1

Calling GetAchievementCriteriaInfo(341, 1) throws an error:
Code:
Message: [string "return GetAchievementCriteriaInfo(341, 1)"]:1: GetAchievementCriteriaInfo(achievementID, criteriaIndex [,countHidden]), criteria not found
Time: Thu Nov 29 16:50:55 2018
Count: 1
Stack: [string "return GetAchievementCriteriaInfo(341, 1)"]:1: GetAchievementCriteriaInfo(achievementID, criteriaIndex [,countHidden]), criteria not found
[C]: in function `GetAchievementCriteriaInfo'
[string "return GetAchievementCriteriaInfo(341, 1)"]:1: in function `func'
Interface\AddOns\Blizzard_DebugTools\Dump.lua:393: in function `DevTools_DumpCommand'
Interface\FrameXML\ChatFrame.lua:2404: in function `?'
Interface\FrameXML\ChatFrame.lua:4756: in function `ChatEdit_ParseText'
Interface\FrameXML\ChatFrame.lua:4417: in function `ChatEdit_SendText'
Interface\FrameXML\ChatFrame.lua:4453: in function `ChatEdit_OnEnterPressed'
[string "*:OnEnterPressed"]:1: in function <[string "*:OnEnterPressed"]:1>

Locals: (*temporary) = 341
(*temporary) = 1
Adding the new third parameter to GetAchievementCriteriaInfo doesn't throw an error as long as you pass 'true', but I don't see any way to know if you need to.

1) It seems that since GetAchievementCriteriaInfo's third parameter is optional, it should return nil in this case if the value is set to false or left off.
2) GetAchievementNumCriteria should have an optional parameter to determine if it counts hidden criteria.
  Reply With Quote