Mod:Creation Kit/CheckFormAgainstArray - CommonArrayFunctions

Member of: Mod:Creation Kit/CommonArrayFunctions Script

Checks to see if the passed in form is in the array. (Basically wrapping a find call with a couple of additional checks to handle None)

Syntax
bool Function CheckFormAgainstArray(Form FormToCheck, Form[] ArrayToCheck, bool returnValueIfArrayIsEmpty = false) global

Parameters

 * FormToCheck: The Form to look for
 * ArrayToCheck: The Form array we are looking in
 * returnValueIfArrayIsEmpty: If the array is empty, return this.
 * Default: false

Return Value

 * True: If the Form is in the array
 * False: If the Form is not in the array
 * False: If Form is None
 * returnValueIfArrayIsEmpty: If ArrayToCheck is Empty/None

Examples
if CommonArrayFunctions.CheckFormAgainstArray(Car, FuelEfficientCars) Debug.Trace("The car is fuel efficient!") endIf