GetNVSEVersion

From GECK

A function added by the New Vegas Script Extender.

Description

Returns the installed version of NVSE. Added by NVSE 1.1.

Syntax

(int) GetNVSEVersion

Example

if GetNVSEVersion < 4
   MessageBoxEx "This mod requires NVSE 4 or later, please upgrade"
endif

Usage Warning

Scripts will fail during game if they reference any features added by an NVSE version later than that installed by the user, so this function is typically used to warn about this. Therefore, this check should be added to a script that does not use any other NVSE functions, otherwise it may never run. Example:

let x := 5
; since 'let' is added by NVSE 4, this script crashes without out

if GetNVSEVersion < 4 ; * pointless
    MessageBoxEx "This mod requires NVSE 4, but you won't see this warning without it because the containing script fails"
endif

See Also

Personal tools