Quantcast
WoWInterface - View Single Post - Tables - count items in them
View Single Post
08-01-16, 09:35 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,257
# only works for array-type tables with no "holes" in them.

For anything else you need an iterator and a counter variable using pairs()

Edit: Reference: http://www.lua.org/manual/5.2/manual.html#3.4.6

Edit2: For your other questions: http://www.lua.org/manual/5.2/manual.html#6.5

Last edited by Dridzt : 08-01-16 at 09:45 AM.
  Reply With Quote