productVersion: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Some wiki formatting) |
Lou Montana (talk | contribs) (Some wiki formatting) |
||
Line 12: | Line 12: | ||
|gr1= System | |gr1= System | ||
|descr= Returns the product's friendly name, identifier and | |descr= Returns the product's friendly name, identifier, version and build number. | ||
{{Feature|arma3|The command has been upgraded to also returns branch identifier, whether or not the game was launched using mods, the platform and the architecture.}} | |||
|s1= [[productVersion]] | |s1= [[productVersion]] | ||
|r1= [[Array]]: | |r1= [[Array]] in format [name, nameShort, version, build, branch, isModded, platform, architecture]: | ||
* [[String]] - | * name: [[String]] - product name | ||
* [[String]] - | * nameShort: [[String]] - product short name | ||
* [[Number]] - | * version: [[Number]] - product version number | ||
* [[Number]] - | * build: [[Number]] - product build number | ||
* [[String]] | * {{GVI|arma3|1.00|size=0.75}} branch: [[String]] - product branch | ||
* {{GVI|arma3|1.00|size=0.75}} isModded: [[Boolean]] - is the product running with mods ([[true]]) or vanilla ([[false]]) | |||
* [[String]] | * {{GVI|arma3|1.00|size=0.75}} platform: [[String]] - can be {{hl|Windows}}, {{hl|Linux}} or {{hl|OSX}} | ||
* [[String]] | * {{GVI|arma3|1.68|size=0.75}} architecture: [[String]] - {{hl|x64}} for 64bit or {{hl|x86}} for 32bit | ||
|x1= <code>[[hint]] [[str]] [[productVersion]]; {{cc|would return ["Arma 2 OA", "arma2oa", 162, 95208] on Arma 2 OA 1.62.95208}}</code> | |x1= <code>[[hint]] [[str]] [[productVersion]]; {{cc|would return ["Arma 2 OA", "arma2oa", 162, 95208] on Arma 2 OA 1.62.95208}}</code> | ||
|x2= <code>[[hint]] [[str]] [[productVersion]]; {{cc|["Arma 3","Arma3",137,128764,"Development",false,"Windows"]}}</code> | |x2= <code>[[hint]] [[str]] [[productVersion]]; {{cc|["Arma 3", "Arma3", 137, 128764, "Development", false, "Windows"]}}</code> | ||
|x3= <code>[[format]] ["%1.%2",([[productVersion]][[a_hash_b|#]]2)/100 [[toFixed]] 2,([[productVersion]][[a_hash_b|#]]3)]; {{cc|returns version e.g.: "2.00.146773"}}</code> | |x3= <code>[[format]] ["%1.%2",([[productVersion]] [[a_hash_b|#]] 2)/100 [[toFixed]] 2,([[productVersion]] [[a_hash_b|#]] 3)]; {{cc|returns version e.g.: "2.00.146773"}}</code> | ||
|seealso= [[supportInfo]], [[requiredVersion]] | |seealso= [[supportInfo]], [[requiredVersion]] | ||
}} | }} |
Revision as of 13:16, 9 December 2021
Description
- Description:
- Returns the product's friendly name, identifier, version and build number.
- Groups:
- System
Syntax
- Syntax:
- productVersion
- Return Value:
- Array in format [name, nameShort, version, build, branch, isModded, platform, architecture]:
- name: String - product name
- nameShort: String - product short name
- version: Number - product version number
- build: Number - product build number
- 1.00 branch: String - product branch
- 1.00 isModded: Boolean - is the product running with mods (true) or vanilla (false)
- 1.00 platform: String - can be Windows, Linux or OSX
- 1.68 architecture: String - x64 for 64bit or x86 for 32bit
Examples
- Example 1:
hint str productVersion; // would return ["Arma 2 OA", "arma2oa", 162, 95208] on Arma 2 OA 1.62.95208
- Example 2:
hint str productVersion; // ["Arma 3", "Arma3", 137, 128764, "Development", false, "Windows"]
- Example 3:
format ["%1.%2",(productVersion # 2)/100 toFixed 2,(productVersion # 3)]; // returns version e.g.: "2.00.146773"
Additional Information
- See also:
- supportInforequiredVersion
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note