IsFormValid

From GECK

A function added by the Fallout Script Extender.

Description

Returns True (1) if the object passed in the ref variable is valid. Returns False (0) if the object stored in the variable is not currently loaded in memory (for instance, a non-persistent reference) or if the variable doesn't hold any object.

This is useful in cases where an invalid ref variable will cause the script or game to crash.

Syntax

(bool) ref.IsFormValid refVar:ref

Example

if IsFormValid SomeRef
   ; it is safe to proceed
endif

See Also

Personal tools