(info) Other great resources: Official JS API docs, Scripting Forum

version

Don't rely on this value!

For Warzone 3.1 Beta 2 and earlier, only the Linux & Windows builds showed the correct version information. Other builds showed something like "TRUNK" or "MASTER".

This bug was fixed in Warzone 3.1 Beta 4, however it should be noted that no indication is given regarding beta status (eg. the version would be "3.1" for Warzone 3.1 Beta 4).

Use version.js to solve these issues.

Overview

A string representing the game version being played.

You can use this to work around missing API features should end-users install your mod in to an earlier version of the game, although it's probably better to check the existence of constants, functions or globals before using them as defined in Change log.

A proposal has been made for a release date or API date to be provided, as version alone is often not descriptive enough.

Availability

Warzone 3.1 Beta 1 and above.

 Backport to earlier releases, and get more specific version information on all releases, using version.js.

Examples

console("Game version: "+version);

See also

  • JS API Backports – a project dedicated to smoothing out the cracks across different versions of Warzone.