Getting the number of indexes in an array.
View Single Post
01-23-14, 06:05 PM
A Flamescale Wyrmkin
Join Date: Aug 2009
Originally Posted by
The table.getn method was actually deprecated in Lua 5.1 in favor of the unary length operator (#). You should also be using pairs for dictionary-style tables. For array-style tables, you can use either ipairs or the (slightly faster) incremental loop.
Yeah, I always prefer incremental loops as opposed to ipairs. Cheers
View Public Profile
Send a private message to Aanson
Find More Posts by Aanson