{"name":"BIS_fnc_bitflagsCheck","operator":null,"title":"BIS fnc bitflagsCheck","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_bitflagsCheck","revid":329417,"updated":"2022-07-27T15:28:10Z","groups":["Bitwise"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.66"}],"since":{"game":"arma3","name":"Arma 3","version":"1.66"},"arma3_since":"1.66","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Checks if one or more flags are set in the given flagset, represented with decimal or hexadecimal number\n\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\n\nIn other words, it simply performs a bitwise AND (&) operation on the two numbers: `flags & flagset > 0`\n\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray","syntaxes":[{"syntax":"[flagset, flag] call BIS_fnc_bitflagsCheck","since":null,"effect":null,"exec":null,"params":[{"name":"flagset","type":"Number","optional":false,"default":null,"description":"flagset","types":["Number"],"since":null,"text":"flagset: Number - flagset"},{"name":"flag","type":"Number","optional":false,"default":null,"description":"one or more flags to check","types":["Number"],"since":null,"text":"flag: Number - one or more flags to check"}],"returns":{"type":"Boolean","types":["Boolean"],"description":"true: one or more flags are set in given flagset - false: no given flag or flags are set in the given flagset","text":"Boolean\n- true: one or more flags are set in given flagset\n- false: no given flag or flags are set in the given flagset"}}],"examples":[{"text":"```sqf\n[2 + 4 + 8, 8] call BIS_fnc_bitflagsCheck; // true\n[2 + 4 + 8, 2 + 32] call BIS_fnc_bitflagsCheck; // true\n[2 + 4 + 8, 1] call BIS_fnc_bitflagsCheck; // false\n[2 + 4 + 8, 1 + 32] call BIS_fnc_bitflagsCheck; // false\n```","code":["[2 + 4 + 8, 8] call BIS_fnc_bitflagsCheck; // true\n[2 + 4 + 8, 2 + 32] call BIS_fnc_bitflagsCheck; // true\n[2 + 4 + 8, 1] call BIS_fnc_bitflagsCheck; // false\n[2 + 4 + 8, 1 + 32] call BIS_fnc_bitflagsCheck; // false"]}],"multiplayer":null,"problems":"Due to various limitations of the Real Virtuality engine this function is intended to work with unsigned 24 bit integers only. This means that the supported range is 2^0...2^24 (1..16777216).","aliases":[],"see_also":["BIS_fnc_bitflagsFlip","BIS_fnc_bitflagsSet","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsUnset"],"notes":[],"categories":["Arma 3: Functions","Arma 3: New Functions","Function Group: Bitwise","Functions","Introduced with Arma 3 version 1.66"],"docblock":null,"filled_from_docblock":[]}