<RetVar> = Returns an integer with the version of the currently installed MSCI script engine.
As of version 2.5 of X3-TC the number is 44.
This can be used in the event you need to write a script that needs to know whether certain instructions are available – perhaps if it needs to support more than one version of the game.
Example:
$script.eng.version = script engine version
if $script.eng.version = 44
add value selection to menu: $menu, text 'Make Your Selection:', value array = $value.arr, default = 0, return id = 'returnvalue'
else if $script.eng.version < 44
$user.input = [THIS] -> get user input: type = Var/Boolien, title = 'Make Your Selection:'
end
This would be useful due to 'add value selection to menu:' not being introduced until version 44 of the script engine. If a user has a previous version the script will still work due to being able to use an alternate user input method.
(Note: For the above example the $menu and the $menu return would also need to be scripted to also check the $script.eng.version to adapt accordingly.)
Command Location:
- »» General Commands
<RetVar> = script engine version