Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 

WoWInterface » Developer Discussions » Lua/XML Help » Print table in order ?


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off