fn vbs arraySetDeep (VBS2)

From Bohemia Interactive Community

Jump to: navigation, search
Editors, please check Policy: Scripting Command Page Syntax.
Introduced in Virtual Battlespace 2 version 1.22

Click on the images for descriptions

Introduced in

Game:
Virtual Battlespace 2
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

Examples

Example 1:
_array = [[1,[0,2],3],[1,1], true] call fn_vbs_arraySetDeep

This will result in _array being

[1,[0, true],3]

Additional Information

Multiplayer:
Behaviour unknown.

Notes

Notes

+ Add Note

Only post proven facts here. Use the talk page or the forums for discussions.

Notes

Bottom Section

Personal tools
Buy ArmA now!