Difference between revisions of "IsFormValid"
Jump to navigation
Jump to search
imported>Geckbot (Automated import of articles) |
imported>Odessa (expanded) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|origin = FOSE1 | |origin = FOSE1 | ||
|summary = Returns 1 if the object passed in the ref variable is valid. Returns 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. | |summary = 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. | |||
|name = IsFormValid | |name = IsFormValid | ||
|returnType = | |returnType = bool | ||
|referenceType = ref | |referenceType = ref | ||
|arguments = | |arguments = | ||
Line 13: | Line 14: | ||
}} | }} | ||
}} | }} | ||
==Example== | |||
<pre> | |||
if IsFormValid SomeRef | |||
; it is safe to proceed | |||
endif | |||
</pre> | |||
==See Also== | |||
*[[IsReference]] | |||
*[[IsPersistent]] | |||
*[[TypeOf]] | |||
*[[Causes of CTDs]] | |||
[[Category:Functions_(FOSE)]] | [[Category:Functions_(FOSE)]] | ||
[[Category:Debugging]] |
Latest revision as of 11:46, 21 July 2014
< [[::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
(bool) ref.IsFormValid refVar:ref
Example
if IsFormValid SomeRef ; it is safe to proceed endif