Garry's Mod Wiki

Garry's Mod Wiki

  vararg unpack( table tbl, number startIndex = 1, number endIndex = #tbl )


This function takes a numeric indexed table and return all the members as a vararg. If specified, it will start at the given index and end at end index.


1 table tbl
The table to generate the vararg from.
2 number startIndex = 1
Which index to start from. Optional.
3 number endIndex = #tbl
Which index to end at. Optional, even if you set StartIndex.


1 vararg
Output values


Prints a vararg

print( unpack({"a", "b", "c"}) )
a b c

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...