{"name":"BIS_fnc_bitflagsUnset","title":"BIS fnc bitflagsUnset","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_bitflagsUnset","revid":328654,"updated":"2022-07-13T17:04:22Z","groups":["Bitwise"],"status":"ok","games":{"arma3":"1.66"},"since":"arma3 1.66","arma3_since":"1.66","description":"Unsets one or more flags in the given flagset, represented with decimal or hexadecimal number\n(Hexadecimal number representation is simply auto-converted into decimal by the engine)\nTo check which flags are present in given flagset use BIS_fnc_bitflagsToArray\n\n**Limitations**:\nDue to various limitations of the Real Virtuality engine this function is\nintended to work with unsigned 24 bit integers only. This means that the\nsupported range is 2^0...2^24 (1...16777216)","syntaxes":[{"syntax":"[flagset, flag] call BIS_fnc_bitflagsUnset","params":[{"name":"flagset","type":"Number","description":"flagset","type_expr":"Number"},{"name":"flag","type":"Number","description":"one or more flags to unset","type_expr":"Number"}],"returns":{"type":"Number","type_expr":"Number","description":"new flagset with given flag or flags unset"}}],"examples":[{"code":["[2 + 4 + 8, 8] call BIS_fnc_bitflagsUnset; // 6 (which is 2 + 4)\n[2 + 4 + 8, 2 + 8] call BIS_fnc_bitflagsUnset; // 4\n[2 + 4 + 8, 1 + 8] call BIS_fnc_bitflagsUnset; // 6 (which is 2 + 4)\n[2 + 4 + 8, 1 + 8 + 8 + 2 + 2] call BIS_fnc_bitflagsUnset; // 10 (which is 2 + 8, since 1 + 8 + 8 + 2 + 2 is in fact 1 + 4 + 16)"]}],"see_also":["BIS_fnc_bitflagsFlip","BIS_fnc_bitflagsCheck","BIS_fnc_bitflagsToArray","BIS_fnc_bitflagsSet"]}