Arma 3 Scripting

Function in Arrays

BIS_fnc_parseNumberSafe

Also available as Markdown and JSON, or read the original wiki page.

Description

Converts expression into a number. Can also convert array of expressions into an array of numbers. If expression does not return a number, 0 is returned.

Syntax

[input] call BIS_fnc_parseNumberSafe

Parameters:

Returns: Number or Array of Numbers if input is an Array

Examples

Example 1

[safeZoneX, safeZoneWAbs, configFile] call BIS_fnc_parseNumberSafe;    // returns [-0.452381,1.90476,0]

Example 2

["1337", "2013", date] call BIS_fnc_parseNumberSafe;                    // returns [1337,2013,[2036,1,1,6,58]]

Example 3

[blufor, opfor, independent, civilian] call BIS_fnc_parseNumberSafe;    // returns [1,0,2,3]

See also

parseNumber · BIS_fnc_parseNumber