Difference between revisions of "GetNVSEVersion"
Jump to navigation
Jump to search
imported>Odessa (added usage warning) |
imported>Odessa m (link to multiversion support) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
|origin = NVSE | |origin = NVSE | ||
|summary = Returns the installed version of NVSE. Added by NVSE | |summary = Returns the installed version of NVSE. Added by NVSE 1.1. | ||
|name = GetNVSEVersion | |name = GetNVSEVersion | ||
|returnType = int | |returnType = int | ||
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> | ||
Line 21: | Line 21: | ||
*[[GetNVSERevision]] | *[[GetNVSERevision]] | ||
*[[GetNVSEBeta]] | *[[GetNVSEBeta]] | ||
*[[Supporting Multiple Versions of NVSE]] | |||
*[[Debug Dumps]] | |||
[[Category:Functions_(NVSE)]] | [[Category:Functions_(NVSE)]] | ||
[[Category:Debugging]] | [[Category:Debugging]] |
Latest revision as of 03:40, 27 August 2014
< [[::Category:Functions|Category:Functions]]
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