Join The Fan Lab, a private Fandom research community for users in the US and UK where you will be asked to share your opinions on all things gaming and entertainment! Click here to see if you qualify

GetFilteredAchievementID

From Wowpedia
Jump to: navigation, search

Returns the ID of a filtered achievement, resulting from a call to SetAchievementSearchString.

achievementID = GetFilteredAchievementID(index)

Arguments

index
Number - The index of the filtered achievement to return the ID of, between 1 and GetNumFilteredAchievements().

Returns

achievementID
Number - The ID of an achievement.

Example

The following snippet lists the names of all achievements containing the word 'flame':

SetAchievementSearchString("flame");
local numFiltered = GetNumFilteredAchievements();

for idx = 1, numFiltered do
  local achievementID = GetFilteredAchievementID(idx);
  local _, achievementName = GetAchievementInfo(achievementID);
  print(achievementName);
end

Patch changes

See also