Jump to content
  • 0

[Solved] Base Building infostand


Sandbird

Question

For some reason infostands from Base Building mod are not saving the access code to the database when they are created.

I dont remember exactly in which cell they get written.

Can someone who has Base building installed and working copy/paste an infostand entry from their database ?

I want to see the structure of it, and where the code gets written so maybe i can fix this.

 

Search for Infostand_2_EP1 in the 'object_data', cell 'Classname' to find it.

 

-Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

nevermind....got it...its the 'fuel' cell.

Code is written like:          _code = _fuel * 1000;

 

So its not sending the 'code' to the database:

 

2013-12-20 14:57:09 HiveExt: [information] Method: 308 Params: 11:Infostand_2_EP1:0:xxxxxxxxxxx:[66.867,[8127.53,2896.75,0.083]]:[]:[]:0:8127528967167:

 

The fuel cell is totally empty....

 

Anyone knows what changed in 1.3.0.1 ?

 

If i manually edit the fuel in the database and restart the server then i can access the gate just fine...So the retrieval code works....but not the insert.

 

The player_basebuild.sqf is sending the values correctly....In my log i got:

 

"BASEBUILDING: classname: Infostand_2_EP1, fuel: 1.008, code: 1008" where:

PVDZE_obj_Publish = [dayz_playerUID,_tmpbuilt,[_dir,_location],_classname,_fuel,_code];
diag_log format["BASEBUILDING: classname: %1, fuel: %2, code: %3", _classname, _fuel, _code];

I guess somewhere in server_publishObject.sqf things get all messed up....but that file hasnt changed since 1.0.2.5 where the script worked fine :/

Link to comment
Share on other sites

  • 0

Update: I changed my server_publishObject.sqf to this:

private ["_class","_uid","_charID","_object","_worldspace","_key","_code","_fuel","_allowed"];
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
_charID = _this select 0;
_object = _this select 1;
_worldspace = _this select 2;
_class = _this select 3;
 
if ((typeOf _object) in allbuildables_class) then {
_fuel = _this select 4;
_code = _this select 5; //added to pick up the code which we passed from player_build.sqf
 
//if (!(_object isKindOf "Building")) exitWith {
//deleteVehicle _object;
//};
_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed) exitWith { };
 
 
//diag_log ("PUBLISH: Attempt " + str(_object));
 
//get UID
_uid = _worldspace call dayz_objectUID2;
 
//Send request
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], _fuel,_uid];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;
 
//_code = _fuel * 1000; //would be only necessary if we wouldn't pass the code from player_build.sqf
_object setVariable ["Code", _code,true]; //set the Code to the Object
_object setVariable ["ObjectUID", _uid,true]; //set ObjectUID to the Object
_object setVariable ["Classname", _class,true]; //set Classname to the Object
 
_allowedObjects = ["TentStorage","TentStorageDomed","TentStorageDomed2", "VaultStorageLocked", "Hedgehog_DZ", "Sandbag1_DZ","BagFenceRound_DZ","TrapBear","Fort_RazorWire","WoodGate_DZ","Land_HBarrier1_DZ","Land_HBarrier3_DZ","Land_HBarrier5_DZ","Fence_corrugated_DZ","WarfareBMGNest_M240_US_EP1","CanvasHut_DZ","ParkBench_DZ","MetalGate_DZ","OutHouse_DZ","Wooden_shed_DZ","WoodShack_DZ","StorageShed_DZ","Plastic_Pole_EP1_DZ","Generator_DZ","StickFence_DZ","LightPole_DZ","FuelPump_DZ","DesertCamoNet_DZ","ForestCamoNet_DZ","DesertLargeCamoNet_DZ","ForestLargeCamoNet_DZ","SandNest_DZ","DeerStand_DZ","MetalPanel_DZ","WorkBench_DZ","WoodFloor_DZ","WoodLargeWall_DZ","WoodLargeWallDoor_DZ","WoodLargeWallWin_DZ","WoodSmallWall_DZ","WoodSmallWallWin_DZ","WoodSmallWallDoor_DZ","LockboxStorageLocked","WoodFloorHalf_DZ","WoodFloorQuarter_DZ","WoodStairs_DZ","WoodStairsSans_DZ","WoodSmallWallThird_DZ","WoodLadder_DZ","Land_DZE_GarageWoodDoor","Land_DZE_LargeWoodDoor","Land_DZE_WoodDoor","Land_DZE_GarageWoodDoorLocked","Land_DZE_LargeWoodDoorLocked","Land_DZE_WoodDoorLocked","CinderWallHalf_DZ","CinderWall_DZ","CinderWallDoorway_DZ","CinderWallDoor_DZ","CinderWallDoorLocked_DZ","CinderWallSmallDoorway_DZ","CinderWallDoorSmall_DZ","CinderWallDoorSmallLocked_DZ","MetalFloor_DZ","WoodRamp_DZ","GunRack_DZ","FireBarrel_DZ","MetalFloor_Preview_DZ","DSHKM_Gue","SearchLight_RUS","RU_WarfareBMGNest_PK","M252"];

if ((typeOf _object) in _allowedObjects) then {
_object addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
};
 
PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];
 
//diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
} else {
 
_allowed = [_object, "Server"] call check_publishobject;
if (!_allowed) exitWith { deleteVehicle _object; };

//diag_log ("PUBLISH: Attempt " + str(_object));

//get UID
_uid = _worldspace call dayz_objectUID2;

//Send request
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid];
//diag_log ("HIVE: WRITE: "+ str(_key));
_key call server_hiveWrite;

_object setVariable ["lastUpdate",time];
_object setVariable ["ObjectUID", _uid,true];
// _object setVariable ["characterID",_charID,true];

_object addMPEventHandler ["MPKilled",{_this call object_handleServerKilled;}];
// Test disabling simulation server side on buildables only.
_object enableSimulation false;

PVDZE_serverObjectMonitor set [count PVDZE_serverObjectMonitor,_object];

//diag_log ("PUBLISH: Created " + (_class) + " with ID " + _uid);
};

Problem fixed.

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
  • Advertisement
  • Discord

×
×
  • Create New...