Difference between revisions of "GetNVSEVersion"
Jump to navigation
Jump to search
imported>Odessa (added usage warning) |
imported>Odessa |
||
Line 15: | Line 15: | ||
if GetNVSEVersion < 4 ; * pointless | if GetNVSEVersion < 4 ; * pointless | ||
MessageBoxEx "This mod requires NVSE 4, but this | MessageBoxEx "This mod requires NVSE 4, but you won't see this warning without it because the containing script fails" | ||
endif | endif | ||
</pre> | </pre> |
Revision as of 03:55, 19 July 2014
< [[::Category:Functions|Category:Functions]]
A function added by the New Vegas Script Extender.
Description
Returns the installed version of NVSE. Added by NVSE V1b1.
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