ListAddArray

From GECK
Jump to: navigation, search


A function added by the ShowOff NVSE Plugin.

Description

Adds the forms from an array to the FormList at the given index (or at the end if not provided). The array's contents are appended in the array key order. Returns 1 for success, 0 if an error is encountered.

This does the same changes to the formlist as multiple ListAddForms would, and is therefore subject to the same warnings as that function. This also means the changes are not savebaked.

Syntax

[help]
(success:bool) ListAddArray formlist:baseform array:array_var index:int 

Or:

(success:bool) AddArrayToFormList formlist:baseform array:array_var index:int

Example

array_var aArr

let aArr := ar_List 1, 2, SunnyREF, player
ListAddArray MyEmptyFormList aArr
DumpFormList MyEmptyFormList 

Will show that the MyEmptyFormList now has "SunnyREF" and "player". Non-forms and invalid forms are skipped.

See Also