Page tree
Skip to end of metadata
Go to start of metadata




Introduced in

Version:1.30

Description

Description: Adds a stack (array) of elements to the beginning of an array and returns it. The input array is also modified by reference. Similar to fn vbs arrayUnShift, however, it adds the contents of an array instead of only one item.

Syntax

Syntax: [array,stack] call fn_vbs_arrayUnShiftStack
Parameters:
  • array1: Array - Array to be added to
  • stack: Array - Elements to be added to the beginning of array1
Return Value: Array - Note, array1 is also modified by reference

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Category VBS Scripting Functions.

Examples

Examples:
array = [1,2,3,4]
[array,[5,6,7]] call fn_vbs_arrayUnShiftStack
//array is now [5,6,7,1,2,3,4]

Additional Information

See also: fn vbs arrayUnShift
Multiplayer: 
Problems: 

Notes