{"name":"BIS_fnc_invAdd","title":"BIS fnc invAdd","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_invAdd","revid":349427,"updated":"2023-11-08T16:27:33Z","groups":["Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Adds item to inventory - checks if there is room for it. Checks if add was done by engine.","syntaxes":[{"syntax":"[object,class,force] call BIS_fnc_invAdd","params":[{"name":"object","type":"Object","type_expr":"Object"},{"name":"class","type":"String","description":"item class to be added","type_expr":"String"},{"name":"force","type":"Boolean","optional":true,"default":"false","description":"true to force add item, other items might be removed","type_expr":"Boolean","text":"force: Boolean - (Optional, default false) true to force add item, other items might be removed"}],"returns":{"type":"Boolean or Array","type_expr":"Boolean | Array","description":"true when successfull, Array if force is set to true and items were removed (retuns items)"}}],"examples":[{"code":["[player,\"someClass\"] call BIS_fnc_invAdd;"]}],"see_also":["BIS_fnc_invRemove","BIS_fnc_invCodeToArray","BIS_fnc_invString","BIS_fnc_invSlots","BIS_fnc_invSlotsEmpty","BIS_fnc_invSlotType"]}