Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!

API GetCategoryNumAchievements

From Wowpedia
Jump to: navigation, search

Returns the total, completed and incompleted number of achievements in a specific category.

total, completed, incompleted = GetCategoryNumAchievements(categoryId[, includeAll])

Arguments

categoryId 
Number - Achievement category ID, as returned by GetCategoryList.
includeAll
Boolean - If true-equivalent, include all achievements, otherwise, only includes those currently visible

Returns

total 
Number - total number of achievements in the specified category.
completed 
Number - number of completed achievements in the specified category.
incompleted 
Number - number of incompleted achievements in the specified category.

Example

The snippet below prints the achievement IDs and names of all achievements in the World Events > Midsummer category:

for i=1, (GetCategoryNumAchievements(161)) do
 local id, name = GetAchievementInfo(161, i)
 print(id, name)
end

See also