Jump to content

[Release] 3.0 Door Management - No More Codes


Zupa

Recommended Posts

when i'm using maintain area on plotmanagement it do not update the LastUpdate Field of the doors in the database, all other object do update..

 

anyone having same problem?

 

i'm using plot4life,doormangement,plotmanagment

 

Any help would be greatly appreciated

Link to comment
Share on other sites

okay i fixed that. i had a misstake in my description.ext but now it looks like this

 

#include "doorManagement\defines.hpp"
#include "plotManagement\plotManagement.hpp"
#include "doorManagement\doorUnlock.hpp"
#include "doorManagement\doorManagement.hpp"
#include "doorManagement\ComboLockUI.hpp"
 
 
now another problem:

I can use the plotpole but if another player build one they can click the option but the window suddenly closes after 0,1 second. There's no Error in my RPT.  :huh:
 
 
#fixed
Link to comment
Share on other sites

Any help on this one .. getting this rpt error
cant log in to server because of it
 

if ((count _intentory > 0) && !(typeOf( _object) in>
13:44:12   Error position: <_intentory > 0) && !(typeOf( _object) in>
13:44:12   Error Undefined variable in expression: _intentory
13:44:12 File mpmissions\__cur_mp.sauerland\custom\system\server_monitor.sqf, line 193
13:44:12 Error in expression <"OEMPos", _pos, true];
Link to comment
Share on other sites

 

Any help on this one .. getting this rpt error

cant log in to server because of it

 

if ((count _intentory > 0) && !(typeOf( _object) in>
13:44:12   Error position: <_intentory > 0) && !(typeOf( _object) in>
13:44:12   Error Undefined variable in expression: _intentory
13:44:12 File mpmissions\__cur_mp.sauerland\custom\system\server_monitor.sqf, line 193
13:44:12 Error in expression <"OEMPos", _pos, true];

 

 

I had this similar issues.

 

1. Check your server_monitor.sqf to make sure you are using _intentory throughout the document or _inventory NOT BOTH. Epoch dev's used _intentory which was a spelling error and some scripts fixed this by saying you need to replace _intentory to _inventory.

 

If step one is done and server works GREAT!!! if not see below.

 

 

2. I found for my case, sometimes for some reason it was adding player names and uid's to walls. Not sure how or why they were getting there, but it was. I ended up doing this to the initDoorManagement.sqf just below this:

TheDoor = _this select 3;
}else{
TheDoor = dayz_selectedDoor;
};

Add this:

if( !(typeOf( TheDoor ) in  DZE_DoorsLocked)) exitWith { cutText ["This is not a door.","PLAIN DOWN"]; }; 

Now I think this has prevented the walls and such from getting players added to it. However you still need to go through your database and remove the gear from the door and such items that shouldn't have inventory.

 

 

 

OR

 

In your variables.sqf add:

DZE_BuildNoInventory = ["WoodSmallWall_DZ","WoodLargeWall_DZ","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorSmall_DZ","CinderWallDoor_DZ","Land_DZE_WoodDoor","WoodSmallWallDoor_DZ","Land_DZE_LargeWoodDoor","CinderWallSmallDoorway_DZ","Land_DZE_GarageWoodDoor","CinderWallDoorway_DZ"];

And modify your server_monitor.sqf to the following. NOTICE I have Plot management and Door management.

if ((count _inventory > 0) && !(typeOf( _object) == "Plastic_Pole_EP1_DZ") && !(typeOf( _object) in  DZE_DoorsLocked) && !(typeOf( _object) in  DZE_BuildNoInventory)) then {

This will ignore counting inventory on server start up for the Objects listed in "DZE_BuildNoInventory"

Link to comment
Share on other sites

@ALL

 

If you have Errors like this:

if ((count _intentory > 0) && !(typeOf( _object) in>
13:44:12   Error position: <_intentory > 0) && !(typeOf( _object) in>
13:44:12   Error Undefined variable in expression: _intentory
13:44:12 File mpmissions\__cur_mp.sauerland\custom\system\server_monitor.sqf, line 193
13:44:12 Error in expression <"OEMPos", _pos, true];
 
Just go to your server_monitor.sqf and replace all "_intentory" with "_inventory"
Link to comment
Share on other sites

 

@ALL

 

If you have Errors like this:

if ((count _intentory > 0) && !(typeOf( _object) in>
13:44:12   Error position: <_intentory > 0) && !(typeOf( _object) in>
13:44:12   Error Undefined variable in expression: _intentory
13:44:12 File mpmissions\__cur_mp.sauerland\custom\system\server_monitor.sqf, line 193
13:44:12 Error in expression <"OEMPos", _pos, true];
 
Just go to your server_monitor.sqf and replace all "_intentory" with "_inventory"

 

Iv just gone through some old server pbo's and they're all called _intentory, so wont changing it make things worse??

Link to comment
Share on other sites

Hi.

 

Got this working (kinda) on my server, however. When I then came to build something, i could not place the object.

 

Has anyone else had this or know why this could be.

 

When installing the files I changed my RSCtext to RSCtext1 and similar with the description in both defines.hpp and doormanagement.hpp files.

 

if anyone has any ideas i would be grateful.

 

Did read through this entire thread and could not see anything but i am going to read through again now to see if i missed anything as i was in quite a rush first time as the server was live and so had to restore back up files. Test server ordered

 

EDIT** this kind of fixed itself so i put it down to me missing something the first time.

Link to comment
Share on other sites

Iv just gone through some old server pbo's and they're all called _intentory, so wont changing it make things worse??

 

omg you only have to check your server_monitor.sqf at the top where the variables are and if there is _inventory and not _intentory you have to change it

Link to comment
Share on other sites

omg you only have to check your server_monitor.sqf at the top where the variables are and if there is _inventory and not _intentory you have to change it

 

omg what you on about, yes i have checked them all and they all say _intentory and not _inventory, thats why i was asking if changing it to inventory, would this not effect other scripts.

 

And btw, i dont have this error, i was just asking the question

Link to comment
Share on other sites

got error around line 92, halp!

 

RTP log: 

18:49:16 Error in expression };

_key call server_hiveWrite;
};
};

_object_damage = {
private["_hitpoin>
18:49:16 Error position: <};

_object_damage = {
private["_hitpoin>
18:49:16 Error Missing {
18:49:16 File z\addons\dayz_server\compile\server_updateObject.sqf, line 92
18:49:16 Error in expression };

_key call server_hiveWrite;
};
};

_object_damage = {
private["_hitpoin>
18:49:16 Error position: <};

_object_damage = {
private["_hitpoin>
18:49:16 Error Missing {
18:49:16 File z\addons\dayz_server\compile\server_updateObject.sqf, line 92];
];

 

/*
[_object,_type] spawn server_updateObject;
*/
private ["_object","_type","_objectID","_uid","_lastUpdate","_needUpdate","_object_position","_object_inventory","_object_damage","_isNotOk","_parachuteWest","_firstTime","_object_killed","_object_repair","_isbuildable"];

_object =     _this select 0;

if(isNull(_object)) exitWith {
    diag_log format["Skipping Null Object: %1", _object];
};

_type =     _this select 1;
_parachuteWest = ((typeOf _object == "ParachuteWest") || (typeOf _object == "ParachuteC"));
_isbuildable = (typeOf _object) in dayz_allowedObjects;
_isNotOk = false;
_firstTime = false;

_objectID =    _object getVariable ["ObjectID","0"];
_uid =         _object getVariable ["ObjectUID","0"];

if ((typeName _objectID != "string") || (typeName _uid != "string")) then
{
    diag_log(format["Non-string Object: ID %1 UID %2", _objectID, _uid]);
    //force fail
    _objectID = "0";
    _uid = "0";
};
if (!_parachuteWest && !(locked _object)) then {
    if (_objectID == "0" && _uid == "0") then
    {
        _object_position = getPosATL _object;
        _isNotOk = true;
    };
};

// do not update if buildable && not ok
if (_isNotOk && _isbuildable) exitWith {  };

// delete if still not ok
if (_isNotOk) exitWith { deleteVehicle _object; diag_log(format["Deleting object %1 with invalid ID at pos [%2,%3,%4]",typeOf _object,_object_position select 0,_object_position select 1, _object_position select 2]); };


_lastUpdate = _object getVariable ["lastUpdate",time];
_needUpdate = _object in needUpdate_objects;

// TODO ----------------------
_object_position = {
    private["_position","_worldspace","_fuel","_key"];
        _position = getPosATL _object;
        _worldspace = [
            (getDir _object) call KK_fnc_floatToString,
            _position call KK_fnc_positionToString
        ];
        _fuel = 0;
        if (_object isKindOf "AllVehicles") then {
            _fuel = fuel _object;
        };
        _key = format["CHILD:305:%1:%2:%3:",_objectID,_worldspace,_fuel];
        //diag_log ("HIVE: WRITE: "+ str(_key));
        _key call server_hiveWrite;
};

_isNormal = true;
if (typeOf (_object) == "Plastic_Pole_EP1_DZ") then{
    _isNormal = false;
    _inventory = _object getVariable ["plotfriends", []]; //We're replacing the inventory with UIDs for this item
};
if (typeOf (_object)in DZE_DoorsLocked) then{
    _isNormal = false;
    _inventory = _object getVariable ["doorfriends", []]; //We're replacing the inventory with UIDs for this item
};

if(_isNormal)then {
    _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;
        };
};

_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]]};
            _object setHit ["_selection", _hit];
        } count _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];
    };

_object_killed = {
    private["_hitpoints","_array","_hit","_selection","_key","_damage"];
    _hitpoints = _object call vehicle_getHitpoints;
    //_damage = damage _object;
    _damage = 1;
    _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]]};
        _hit = 1;
        _object setHit ["_selection", _hit];
    } count _hitpoints;
    
    if (_objectID == "0") then {
        _key = format["CHILD:306:%1:%2:%3:",_uid,_array,_damage];
    } else {
        _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];
    if ((count _this) > 2) then {
        _killer = _this select 2;
        _charID = _object getVariable ['CharacterID','0'];
        _objID     = _object getVariable['ObjectID','0'];
        _objUID    = _object getVariable['ObjectUID','0'];
        _worldSpace = getPosATL _object;
        if (getPlayerUID _killer != "") then {
            _name = if (alive _killer) then { name _killer; } else { format["OBJECT %1", _killer]; };
            diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6, Killer: %7 (UID: %8)", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace, _name, (getPlayerUID _killer)];
        } else {
            diag_log format["Vehicle killed: Vehicle %1 (TYPE: %2), CharacterID: %3, ObjectID: %4, ObjectUID: %5, Position: %6", _object, (typeOf _object), _charID, _objID, _objUID, _worldSpace];
        };
    };
};

_object_repair = {
    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]]};
        _object setHit ["_selection", _hit];
    } count _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];
};
// TODO ----------------------

_object setVariable ["lastUpdate",time,true];
switch (_type) do {
    case "all": {
        call _object_position;
        call _object_inventory;
        call _object_damage;
        };
    case "position": {
        if (!(_object in needUpdate_objects)) then {
            //diag_log format["DEBUG Position: Added to NeedUpdate=%1",_object];
            needUpdate_objects set [count needUpdate_objects, _object];
        };
    };
    case "gear": {
        call _object_inventory;
            };
    case "damage": {
        if ( (time - _lastUpdate) > 5) then {
            call _object_damage;
        } else {
            if (!(_object in needUpdate_objects)) then {
                //diag_log format["DEBUG Damage: Added to NeedUpdate=%1",_object];
                needUpdate_objects set [count needUpdate_objects, _object];
            };
        };
    };
    case "killed": {
        call _object_killed;
    };
    case "repair": {
        call _object_damage;
    };
};
 

 

];
];

 

Ignore the 2 ]; outside spoiler field, put server_updateObject.sqf in quotation field.

 

Link to comment
Share on other sites

Ok.. not sure if anyone has noticed this.. also it could relate to some pictures I've seen while skimming through the 17 pages to see if someone has noticed this..

 

So when our players build a door / garage door etc.. and upgrade with a lock everything is good, sql Db updates with there Id and Name and they can manage it

 

BUT

 

If a player "crafts" a door way and upgrades it with a lock while its still in their inventory and then places it down ( the door comes with a lock on it ) the door does not have the players name or ID in the DB inventory to be managed..

 

Do I just have a old version, messed it up, forgot something or am I the first to notice this?

 

Draftkid Out!

Link to comment
Share on other sites

RESOLVED

 

ok so i have it working but i am getting these 2 errors has anyone got a idea how to fix them please thanks

 

if ((count _intentory > 0) && !(typeOf( _object) ==>
 1:08:13   Error position: <_intentory > 0) && !(typeOf( _object) ==>
 1:08:13   Error Undefined variable in expression: _intentory
 1:08:13 File z\addons\dayz_server\system\server_monitor.sqf, line 198
 1:08:13 Error in expression <["OEMPos", _pos, true];

 

FIXED ABOVE....WAS A SPELLING MISTAKE  intentory should be inventory....i found that out a few posts back.

 

 

object_damage = {
private["_hitpoin>
 1:08:12   Error position: <};

_object_damage = {
private["_hitpoin>
 1:08:12   Error Missing {
 1:08:12 File z\addons\dayz_server\compile\server_updateObject.sqf, line 88
 1:08:13 "Res3tting B!S effects..."
 1:08:13 "HIVE: Starting"
 1:08:13 "HIVE: trying to get objects"
 1:08:13 "HIVE: found 14 objects"
 1:08:13 "HIVE: Commence Object Streaming..."
 1:08:13 "HIVE: got 2 Epoch Objects and 12 Vehicles"
 1:08:13 Error in expression <["OEMPos", _pos, true];

 

FIXED ABOVE  for some reason ive either missed out or made a mistake in the code .

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...