_qor 11 Posted October 7, 2015 Hey, I want to know how much weapons and magazines are within a spefic cargo. getWeaponCargo and getMagazineCargo return the following array: [["AK_74","M4A1"],[4,30]] So (getWeaponCargo _vehicle) select 1 would return all the amounts of the weapons. But how can I easily add them to one sum? Share this post Link to post Share on other sites
opusfmspol 282 Posted October 8, 2015 how can I easily add them to one sum? _wpnCount = (getWeaponCargo _vehicle) select 1; _total = 0; {_total = _total + _x} forEach _wpnCount; Share this post Link to post Share on other sites
_qor 11 Posted October 9, 2015 Great, it works. Now I am finally aware of what forEach does ;) Share this post Link to post Share on other sites