Originally Posted by Seerah
I'm assuming you want to save the search results to the AchievID variable?
Right now, the variable is just "x,n" because you're assigning the string "x,n" to that variable.
AchievID = ("x,n")
should be
AchievID = (x..","..n)
This will save the value of x and the value of n separated by a comma. The two dots (..) concatenate everything together.
|
OMG Seerah, i just had a duh moment lol. TY so much. I was actually way off on how to parse that table with as little code as possible.
I spent all night trolling on Curse with another trying to get this to work, but what we did was
Code:
local AchievementLister = {}
AchievID = {} -- account variables
AchievementLister.frame = CreateFrame("Frame", nil, UIParent)
SLASH_ACHIEVEMENTLISTER1 = "/alister"
SLASH_ACHIEVEMENTLISTER2 = "/achievementlister"
SlashCmdList[ "ACHIEVEMENTLISTER" ] = function() AchievementLister:runSlash() end
function AchievementLister:runSlash()
local max = 5000
local count = 1
for x=1,max do
local _,name = GetAchievementInfo(x)
if name then
AchievID[ count ] = x .. " - " .. name
count=count+1
end
end
end
nothing fancy it got the job done. It parsed in count all Achievements that have a space character in its string. Then saved count to a variable. I posted the full list on curseforge and am trying to make a few minutes to post here too, served myself as a good reference.
http://forums.curseforge.com/showthread.php?t=17344
the list is on WoWwiki @
http://www.wowwiki.com/Complete_list...evement_ID%27s search page in IE works great.