From Bohemia Interactive Community
Revision as of 14:48, 1 September 2019 by Lou Montana (talk | contribs) (Text replacement - "|= Game name" to "|Game name=")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Introduced with Arma 3 version 1.681.68
Hover & click on the images for descriptions


Converts given, formatted as simple array, String into a valid Array. Simple array is array consisting of Numbers, Strings, Booleans and Arrays of all of the above. For example: [1,"2",true,[4,"five",false]]. The string representation of this array compatible with parseSimpleArray will be "[1,""2"",true,[4,""five"",false]]" accordingly. This command is almost 4x faster than similar uncached call compile method. And because call compile is not required, it is also more secure and primarily intended for use with callExtension to parse the String output into Array. Since Arma 3 v.1.95.145925 the command will tolerate extra spaces and supports single quotes. The only recognised keywords (case insensitive) are:
  • true - translates into true
  • false - translates into false
  • nil - translates into nil
  • null - translates into nil
  • <null> - translates into nil
  • any - translates into nil


parseSimpleArray stringArray
stringArray: String - string formatted as simple array
Return Value:
Array - valid array


Example 1:
_arr = parseSimpleArray "[1,2,3]";
Example 2:
_bool = true; _num = 123.45; _str = "ok"; _arr = [1,false,"cool"]; _res = parseSimpleArray format ["[%1,%2,%3,%4]", _bool, _num, str _str, str _arr]; // Note how _bool and _num do not need str, however if used anyway, the result in this case would be identical hint str _res; // [true,123.45,"ok",[1,false,"cool"]]

Additional Information

See also:


Only post proven facts here. Report bugs on the feedback tracker. Use the Talk page or the Forums for discussions.


Bottom Section