Pack: Difference between revisions

From Pico-8 Wiki
Jump to navigation Jump to search
imported>Frederic.souchu
mNo edit summary
(added see also and example)
Line 5: Line 5:
}}
}}
Returns a new table with all parameters stored into keys 1, 2, etc
Returns a new table with all parameters stored into keys 1, 2, etc
Examples
<syntaxhighlight lang="lua">
tab = pack(x, y, dx, dy) --tab = [x, y, dx, dy]
</syntaxhighlight>
== See also ==
* [[unpack]]
[[Category:Reference]]
[[Category:Reference]]
[[Category:Api]]
[[Category:Api]]
[[Category:Lua]]
[[Category:Lua]]

Revision as of 20:39, 27 September 2020

pack( ... )
Creates a table from the given parameters.
...
parameters

Returns a new table with all parameters stored into keys 1, 2, etc

Examples

tab = pack(x, y, dx, dy) --tab = [x, y, dx, dy]

 See also