Pack: Difference between revisions

From Pico-8 Wiki
Jump to navigation Jump to search
(added see also and example)
(syntax error)
Line 8: Line 8:
Examples
Examples
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
tab = pack(x, y, dx, dy) --tab = [x, y, dx, dy]
tab = pack(x, y, dx, dy) --tab = {x, y, dx, dy}
</syntaxhighlight>
</syntaxhighlight>
== See also ==
== See also ==

Revision as of 20:59, 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