Sv Destruct

Revision as of 12:57, 27 June 2014 by imported>Odessa (Created page with "{{Function |origin = NVSE |summary = Added by NVSE V4. Destroys the contents of up to ten string variables, resetting their value to NULL (empty, zero). Unlike other varia...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Added by NVSE V4. Destroys the contents of up to ten string variables, resetting their value to NULL (empty, zero).

Unlike other variables, string variables might not be automatically destroyed when their script is, and potentially cause bloat if not destructed.

All string variables created by a mod are automatically destroyed when the mod is unloaded, however.

Syntax

(None) Sv_Destruct ToDestruct:string_var optional-1:string_var ... optional-9:string_var

Example

string_var my_string

let my_string := "whatever"

Sv_Destruct my_string

; my_string == 0 (not initialized)
string_var s1
string_var s2
string_var s3

Sv_Destruct s1, s2, s3

; * destructed all 3 at once.

See Also