View Single Post
01-24-13, 05:03 AM   #1
skarie
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Jun 2011
Posts: 37
Print table in order ?

How do I print this array/table in order every time without changing the structure of it?

Code:
local rbuffs = {	["Bloodlust Heroism"] = false,
					["Attack Power"] = false,
					["Attack Speed"] = false,
					["Critical Strike Chance"] = false,
					["Mastery"] = false,
					["Spell Haste"] = false,
					["Spell Power"] = false,
					["Stamina"] = false,
					["Stat Multiplier"] = false,
}
for k,v in pairs(rbuffs) do
print( k.. "\n" )
end
Is there something in lua that allows me to iterate through the above array/table in a predictable manner? Thanks.
  Reply With Quote