Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API unpack

Last wiki revision 2022-08-03

Returns values stored in a table's array portion. ... = unpack(t [, first [, last]])

  • t: - A table to unpack values from.
  • first: - Index of the first value to return (default: 1).
  • last: - Index of the last value to return (default: ).
  • :Mixed - Values contained at indices through in the table.
  • Unless is explicitly given, unpack relies on the (array length) operator which can have undefined behaviour for tables holding nil values before the end of the array.

Typical usage:

Unpacking tables with nil values:

Source

https://warcraft.wiki.gg/wiki/API_unpack · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.