Ar HasInvalidRefs

From GECK
Jump to: navigation, search


A function added by the SUP NVSE Plugin.

Description

Returns if array contains NULL references (i.e.if array object's origin mod is disabled or temporary reference which was in array is removed from the game). Has additional parameter for checking multidimensional arrays.

Syntax

[help]
(iHasBadRefs:int) Ar_HasInvalidRefs myArr:array Array Dimension:int

Example

array_var ar_myArr
int iHasBadRefs

set iHasBadRefs to Ar_HasInvalidRefs ar_myArr 

Will set iHasBadRefs to 1 if array contains null refs.

array_var ar_myArr
int iHasBadRefs

let ar_myArr := Ar_construct Array
let ar_myArr[0] := Ar_construct Array
let ar_myArr[1] := Ar_construct Array

set iHasBadRefs to Ar_HasInvalidRefs ar_myArr 1

Will set iHasBadRefs to 1 if ar_myArr[1] array contains null refs.