Skip to content

Latest commit

 

History

History
32 lines (21 loc) · 1.13 KB

array_push_ext.md

File metadata and controls

32 lines (21 loc) · 1.13 KB

Home > Community Toolbox Reference > Array utilities > Basic operations

array_push_ext

Go to source

Pushes items from one array at the end of another array.

Arguments
Argument Type Usage Description
dest Array Required The destination array to push the items to.
source Array Required The source array with the items to push.
offset Real Default: 0 The offset of the source array to start taking items from.
length Real Default: undefined The length of the source array subsection to push.
Returns

N/A

Example

The following code moves all items from the chest to the inventory.

array_push_ext(global.inventory, chest_content);
array_clear(chest_content);

Update history

  • 24.6.0 - Created a function to push items from an array to another array.