{"name":"BIS_fnc_decodeFlags2","operator":null,"title":"BIS fnc decodeFlags2","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_decodeFlags2","revid":327243,"updated":"2022-07-12T22:11:47Z","groups":["Bitwise"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.00"}],"since":{"game":"arma3","name":"Arma 3","version":"1.00"},"arma3_since":"1.00","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Decodes a single scalar into array of unique binary flags (zeroes or ones).\n\n> [!NOTE]\n> The maximal decodable number is **16777215** (224 - 1).","syntaxes":[{"syntax":"[value, size] call BIS_fnc_decodeFlags2","since":null,"effect":null,"exec":null,"params":[{"name":"value","type":"Number","optional":true,"default":"0","description":"the value to be converted","types":["Number"],"since":null,"text":"value: Number - (Optional, default 0) the value to be converted"},{"name":"size","type":"Number","optional":true,"default":"1","description":"wanted array size","types":["Number"],"since":null,"text":"size: Number - (Optional, default 1) wanted array size"}],"returns":{"type":"Array of Numbers","types":["Array","Number"],"description":"\"boolean\" flags where 0 = false and 1 = true","text":"Array of Numbers - \"boolean\" flags where 0 = false and 1 = true"}}],"examples":[{"text":"```sqf\nprivate _result = 13 call BIS_fnc_decodeFlags2; // returns [1,0,1,1]\n```","code":["private _result = 13 call BIS_fnc_decodeFlags2; // returns [1,0,1,1]"]},{"text":"```sqf\nprivate _result = [13, 8] call BIS_fnc_decodeFlags2; // returns [1,0,1,1,0,0,0,0]\n```","code":["private _result = [13, 8] call BIS_fnc_decodeFlags2; // returns [1,0,1,1,0,0,0,0]"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_encodeFlags","BIS_fnc_encodeFlags2","BIS_fnc_encodeFlags4","BIS_fnc_encodeFlags8","BIS_fnc_decodeFlags","BIS_fnc_decodeFlags4","BIS_fnc_decodeFlags8"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Bitwise","Functions","Introduced with Arma 3 version 1.00"],"docblock":null,"filled_from_docblock":[]}