Forum Jump :

Author Message


Posts: 16
Rank:


Level: Member

Country: us
Location:
Occupation:
Age:
In-game name: Sgt. Justin

 
#1 Posted at 2017-08-30 18:25        
     
This is what i have currently working
_ITEM_MACRO_item = {
    params ["_unit", "_item", "_testedClass", "_container"];
    _unit removeItem _item;
    systemChat format ["%1 was removed.", getText (configFile >> "CfgWeapons" >> _item >> "displayName")];

    if (_mode == 1) then {
        _container addItemCargoGlobal [_item, 1];
    };
};

But what i need is something like this
_ITEM_MACRO_item = {
    params ["_unit", "_item", "_testedClass", "_container"];
    _unit removeItem _item;
    systemChat format ["%1 was removed.", getText (configFile >> "CfgWeapons", "CfgMagazines", "CfgAmmo" >> _item >> "displayName")];

    if (_mode == 1) then {
        _container addItemCargoGlobal [_item, 1];
    };
};

Any suggestions on how i can use GetText with an array of config files instead of just a single one?

EDIT ---- ====== ----

Tried using an array still not working
_ITEM_MACRO_item = {
    params ["_unit", "_item", "_testedClass", "_container"];
    _unit removeItem _item;
    systemChat format ["%1 was removed.", getText (configFile >> ["CfgWeapons", "CfgMagazines", "CfgAmmo"] >> _item >> "displayName")];

    if (_mode == 1) then {
        _container addItemCargoGlobal [_item, 1];
    };
};

This post was edited by LordComfy (2017-08-31 10:08, 103 days ago)