Little help needed with one file ....

ElDubya

Well-Known Member
Hi all,

I have tried editing this file half a dozen times and broken the script every time. I need to merge these two sections together so I can keep my gold coin and plot management working but add origins building stuff.

Code:
_object_inventory = {
    private["_inventory","_previous","_key","_updateGear"];
    _updateGear = false;
    if((typeOf _object) in DZE_Origins_Buildings) then {
        _state = _object getVariable ["CanBeUpdated",false];
        if(_state) then {
            _updateGear = true;
            _object setVariable ["WeaponCargo", getWeaponCargo _object,true];
            _object setVariable ["MagazineCargo", getMagazineCargo  _object,true];
            _object setVariable ["BackpackCargo", getBackpackCargo  _object,true];
            _inventory = [
                _object getVariable["WeaponCargo",[]],
                _object getVariable["MagazineCargo",[]],
                _object getVariable["BackpackCargo",[]]
            ];
        };
    } else {
        _updateGear = true;
        _inventory = [
            getWeaponCargo _object,
            getMagazineCargo _object,
            getBackpackCargo _object
        ];
    };
    if(_updateGear) then {
        _previous = str(_object getVariable["lastInventory",[]]);
        if (str(_inventory) != _previous) then {
            _object setVariable["lastInventory",_inventory];
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_inventory];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
            };
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        };
    };
};

and

Code:
_object_inventory = {
    private["_inventory","_previous","_key"];
        if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
} else {
        _inventory = [
            getWeaponCargo _object,
            getMagazineCargo _object,
            getBackpackCargo _object
            /*ZSC*/
            , _object getVariable["bankMoney",0]
            /*ZSC*/
        ];
};
        _previous = str(_object getVariable["lastInventory",[]]);
        if (str(_inventory) != _previous) then {
            _object setVariable["lastInventory",_inventory];
            if (_objectID == "0") then {
                _key = format["CHILD:309:%1:%2:",_uid,_inventory];
            } else {
                _key = format["CHILD:303:%1:%2:",_objectID,_inventory];
            };
            //diag_log ("HIVE: WRITE: "+ str(_key));
            _key call server_hiveWrite;
        };
};

I need to merge these together and can't for the life of me figure out how. Can anyone PLEASE help me out? Any help would be GREATLY appreciated.
 

I will give you some real support instead of bitching about mis-placed topics.

1.Download notepad ++ (plusplus)
2.Open it and click plugins and search for "compare".
3.Open both files u need to merge and click compare at the top.
4. It shows in colours what is wrong/different compared to both files.



Hope this can help you, u can always add me on skype if you need me: puregamingtoxxic
 
SchwEde has been kindly helping me over on the epochmod forums as I posted this thread there too. Cheers for the concern though.
 
mister real support, how about checking first, what I'm posting there before letting out your scumbag Steve here?!

Good that you have helped someone, great.
Stop saying misplaced this or that, no one really cares. Opendayz.net isn't the forum where they bitch about topics, its about help.

But this is also off-topic, think this thread is done :)
 
get your facts straight. I never said something about misplaced thread, the link supposed to guide people to the other thread so there wouldn't be the exact same discussion on different forums.
 
Back
Top