API table.setn

From Warcraft Wiki
Jump to navigation Jump to search

Obsolete; throws an error if called.

table.setn(table, n)

Arguments

table
Table - The table to be changed.
n
number - New table size.

Details

  • Lua 5.0 had no length operator; instead, the size of arrays could be acquired through table.getn(t), which returned t.n if it that key was set. This function would explicitly set that key.
  • In WoW, this function throws a "'setn' is obsolete" error when called.