Difference between revisions of "GetNVSEVersion"
Jump to navigation
Jump to search
imported>Odessa (started page) |
imported>Odessa (added usage warning) |
||
Line 8: | Line 8: | ||
endif | 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: | |||
<pre> | |||
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 this check will never run because the script crashes" | |||
endif | |||
</pre> | |||
==See Also== | ==See Also== | ||
*[[GetNVSERevision]] | *[[GetNVSERevision]] | ||
*[[GetNVSEBeta]] | *[[GetNVSEBeta]] | ||
[[Category:Functions_(NVSE)]] | [[Category:Functions_(NVSE)]] | ||
[[Category:Debugging]] |
Revision as of 03:53, 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 this check will never run because the script crashes" endif