{"name":"BIS_fnc_invCodeToArray","title":"BIS fnc invCodeToArray","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_invCodeToArray","revid":349404,"updated":"2023-11-08T16:27:26Z","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":"Converts inventory code (used in configs) to array with numbers for weapons and magazines (and their counts).","syntaxes":[{"syntax":"[configCode] call BIS_fnc_invCodeToArray","params":[{"name":"configCode","type":"Number","description":"config code, see example","type_expr":"Number"}],"returns":{"type":"Array of Numbers","type_expr":"Array<Number>","description":"items slots numbers"}}],"examples":[{"code":["[call compile getText (configfile >> \"CfgVehicles\" >> typeOf player >> \"weaponSlots\")] call BIS_fnc_invCodeToArray;//Can return [1,0,0,0,0,0,0,0]"]}],"see_also":["BIS_fnc_invRemove","BIS_fnc_invString","BIS_fnc_invSlots","BIS_fnc_invSlotsEmpty","BIS_fnc_invSlotType","BIS_fnc_invAdd"]}