Ar Insert

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Inserts a single element into an Array-type array (list) at the specified index, provided the index is not greater than the current size of the array. Elements above the index are shifted up by one index.

Usable only with Array-type arrays. Note that this modifies an array in place- it returns a boolean, not a new array.

Syntax

[help]
(bool) Ar_Insert Array:array Index:int Element:multi

Example

array_var MyList

let MyList := Ar_List SunnyREF, CheyenneREF

Ar_Insert MyList, 1, EasyPeteREF

; * MyList now contains: SunnyREF, EasyPeteREF, CheyenneREF

See Also