GetNVSEVersion

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender.

Description

Returns the installed version of NVSE.

Syntax

[help]
(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 it

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