Pac Man 10 Posted October 24, 2013 I'm trying to count the players primary magazines. It returns the magazine type as the parent class, thus defaulting to 0. What is wrong with my path? I want to reference a 30Rnd_65x39_caseless_mag & not "B_65x39_Caseless" in this example. Config viewer says ammo = "B_65x39_Caseless";. But how can I get the actual magazine returned as text string? I've tried using "type" at the end. Any help is appreciated. If any of this makes any sense! _PWAmmoType = getText (configfile >> "CfgMagazines" >> primaryWeaponMagazine player select 0 >> "ammo"); _PWCountType = ({_x == _PWAmmoType} count magazines player); player sideChat format ["%1",_PWAmmoType]; player sideChat format ["%1",_PWCountType]; Share this post Link to post Share on other sites
Kunsa 10 Posted October 24, 2013 isn't (primaryWeaponMagazine player select 0) sufficient? i.e. hint primaryWeaponMagazine player; //["30Rnd_65x39_caseless_mag"] so no need to check config Share this post Link to post Share on other sites
Pac Man 10 Posted October 24, 2013 SOLVED Thanks for opening my eyes. I was over complicating things. This is what I did. _PWAmmoType = primaryWeaponMagazine player; _PWCountType = ({_x == _PWAmmoType select 0} count magazines player); player sideChat format ["%1",_PWAmmoType]; player sideChat format ["%1",_PWCountType]; Share this post Link to post Share on other sites