Arma 3 Scripting

Function in Math, Strings

BIS_fnc_parseNumber

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

Description

Return number from expression

Syntax

value call BIS_fnc_parseNumber

Parameters:

Returns: Number - parsed number, -1 if value is not a number

Examples

Example 1

private _result = 7.62 call BIS_fnc_parseNumber;
_result = "7.62" call BIS_fnc_parseNumber;
_result = { 7.62 } call BIS_fnc_parseNumber;

Example 2

"[10,20,30]" call BIS_fnc_parseNumber; //returns [10,20,30]

See also

parseNumber