{"name":"BIS_fnc_invCodeToArray","operator":null,"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","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"configCode","type":"Number","optional":false,"default":null,"description":"config code, see example","types":["Number"],"since":null,"text":"configCode: Number - config code, see example"}],"returns":{"type":"Array of Numbers","types":["Array","Number"],"description":"items slots numbers","text":"Array of Numbers - items slots numbers"}}],"examples":[{"text":"```sqf\n[call compile getText (configfile >> \"CfgVehicles\" >> typeOf player >> \"weaponSlots\")] call BIS_fnc_invCodeToArray;//Can return [1,0,0,0,0,0,0,0]\n```","code":["[call compile getText (configfile >> \"CfgVehicles\" >> typeOf player >> \"weaponSlots\")] call BIS_fnc_invCodeToArray;//Can return [1,0,0,0,0,0,0,0]"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["BIS_fnc_invRemove","BIS_fnc_invString","BIS_fnc_invSlots","BIS_fnc_invSlotsEmpty","BIS_fnc_invSlotType","BIS_fnc_invAdd"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Inventory","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}