Introduced in

Version:1.22

Description

Description:Sets an element in a nested array. Can only overwrite elements which were available before, cannot create new elements as opposed to set. Changes the given array by reference.

Syntax

Syntax:[array, path, element] call fn_vbs_arraySetDeep
Parameters:
  • array: Array - The array you want to change.
  • path: Array - Path to the element you want to change.
  • element: Anything - The element you want to set.
Return Value:Array

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,[0,2],3],[1,1], true] call fn_vbs_arraySetDeep

This results in _array being:

[1,[0, true],3]

Additional Information

See also: 
Multiplayer: 
Problems: 

Notes