Broken server pbo can someone please take a look

CommanderRetra

Moderator
Staff member
The following code is line 100 to 120 from the dayz_server.pbo > compiles > server_updateObject.sqf
Code:
            _key call server_hiveWrite;
        };
    };
};
// ### BASE BUILDING 1.2 ### END
 
_object_damage = {
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
    _hitpoints = _object call vehicle_getHitpoints;
    _damage = damage _object;
    _array = [];
    {
        _hit = [_object,_x] call object_getHit;
        _selection = getText (configFile >> "CfgVehicles" >> (typeOf _object) >> "HitPoints" >> _x >> "name");
        if (_hit > 0) then {_array set [count _array,[_selection,_hit]]};
    } forEach _hitpoints;
    _key = format["CHILD:306:%1:%2:%3:",_objectID,_array,_damage];
    diag_log ("HIVE: WRITE: "+ str(_key));
    _key call server_hiveWrite;
    _object setVariable ["needUpdate",false,true];
};

I believe the only }; are just finishing arrays
 
The very last line 109 after the Basebuilding finishes... is ending nothing?


Code:
// ### BASE BUILDING 1.2 ### START
//This forces object to write to database changing the inventory of the object twice
// so it updates the object from operate_gates.sqf
 
    private["_inventory","_previous","_key"];
    // This writes to database if object is buildable
    if (typeOf(_object) in allbuildables_class) then {
    //First lets make inventory [[[],[]],[[],[]],[[],[]]] so it updates object in DB
            _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: Buildable: "+ str(_key));
        _key call server_hiveWrite;
    //Since we cant actually read from DB, lets make inventory this [], than write it again, to insure its updated to DB
            _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: Buildable: "+ str(_key));
        _key call server_hiveWrite;
// DO DEFAULT server_updateObject if not a buildable
    } else {
            _inventory = [
            getWeaponCargo _object,
            getMagazineCargo _object,
            getBackpackCargo _object
        ];
   
 
        _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;
        };
    };
};
// ### BASE BUILDING 1.2 ### END
// ###COPY END
};
 
Just noticed its not on the bit you just posted... but it is on the one you uploaded.

So I'm guessing if the one you just posted still doesnt work then thats not the problem :p
 
a) server_playerLogin.sqf, line 60 -> remove };
b) your server_bot files are html files, not SQF, redownload and fix
c) fn_selfActions, line 112, remove */

See if that works. Most of the mods that you use are a nightmare in regards of programming style, seems a lot of the "developers" have never even heard of declaring variables, scope and the usage of squint.

Hope these changes fix your issue though.

Sarge
 
Hi Sarge,
I tried your fixes, yes thay may improve performance and make some things work properly but it hasn't fixed my issue. :( I have updated the Dropbox links in my first post so you could take another look if you would be so kind.
These are the errors in my .RPT log that I have been encountering which in turn are killing my server.
Code:
if (typeOf(_object) in allbuildables_class) then {
 
_inventory >
6:25:16  Error position: <allbuildables_class) then {
 
_inventory >
6:25:16  Error Undefined variable in expression: allbuildables_class
6:25:16 File z\addons\dayz_server\compile\server_updateObject.sqf, line 63
6:25:16 "HIVE: WRITE: "CHILD:306:"133":[["velka vrtule",0.025],["glass3",0.048],["glass4",0.048],["motor",0.56],["elektronika",0.286],["munice",0.69]]:0.021:""
6:25:16 "HIVE: WRITE: "CHILD:305:"134":[30,[12315.3,12626.5,-0.0392151]]:0.678701:""
6:25:16 Error in expression <vious","_key"];
Code:
_inventory >
6:25:16  Error Undefined variable in expression: allbuildables_class
6:25:16 File z\addons\dayz_server\compile\server_updateObject.sqf, line 63
6:25:16 "HIVE: WRITE: "CHILD:306:"138":[]:0.0319254:""
6:25:16 Wrong text element 'null'
And I think I need to edit one of my files again so the AI from your mod can fly again :/ anyways that is not the problem.

Cheers

Retra
 
sort this one first:

Code:
6:22:47 Warning Message: Script z\addons\dayz_server\compile\server_playerLogin.sqf not found
6:22:47 Warning Message: Script z\addons\dayz_server\compile\server_onPlayerDisconnect.sqf not found

then work your way through the remaining issues.

Sarge
 
well, how about you start from a fresh server install ? add mods one by one and see what happens,
 
hey sarge, i think i got it working. wanna check it out. i just dont konw how to pull up the interface ingame.
and i dont see where to upload the file..
if anyone wants the file feel free to join me on

teamspeak: ts60.gameservers.com:9150
or email me [email protected]
 
Back
Top