IsFormValid

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

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

[help]
(bool) ref.IsFormValid refVar:ref

Example

if IsFormValid SomeRef
   ; it is safe to proceed
endif

See Also