Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Inside the Database they are stored as X.XXX the scripts calculates its back.
If you have Navicat just right click at the table and choose "Design Table"
It should look like this
~Snip~
Right, Reality server ordered, to hell with dayz.st
As soon as its online i'll be starting from scratch with this. I'm determined to get this working lol. If anyone has this running on Chernarus Reality Build, please let me know, help would be appreciated.
Heh, you know you can upgrade the database DayZ.ST gives you to a Reality build right? I'm running DayZ.ST as well. I just upgraded the schema to 0.39...
Hey guys, i just started with dayz scripting / servers ... and all this some days before and i have a lot of fun to waste my time with all this dayz stuff!
i love basebuilding because its an important feature for me to beat origins...
SO... i had the same problem with trying to get the stuff i build in the game saved to the DB...
i think i found a way to get it working for most / all of you guys
i study the db calls and then i found a solution that works for me (tested)
the problem is the structure of the DB "AND" the relation to owner_id [(for me in bliss) changing as defined down should work for all. maybe you just have to change the table names / culumn names as needed]
so see this example for my bliss:
CREATE TABLE IF NOT EXISTS `instance_deployable` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`unique_id` varchar(60) NOT NULL,
`deployable_id` smallint(5) unsigned NOT NULL,
`owner_id` varchar(60) NOT NULL,
`instance_id` bigint(20) unsigned NOT NULL DEFAULT '1',
`worldspace` varchar(60) NOT NULL DEFAULT '[0,[0,0,0]]',
`inventory` varchar(2048) NOT NULL DEFAULT '[]',
`last_updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`Hitpoints` varchar(500) NOT NULL DEFAULT '[]',
`Fuel` decimal(4,3) DEFAULT '0.000',
`Damage` double(13,0) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `idx1_instance_deployable` (`deployable_id`),
KEY `idx3_instance_deployable` (`instance_id`),
KEY `idx2_instance_deployable` (`unique_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=68 ;
--->
`unique_id` varchar(60) NOT NULL, changed to varchar because should be same as unique_id from survivor table!
KEY `idx2_instance_deployable` (`unique_id`) is the new relation (ID (int) before)
Fuel` decimal(4,3) DEFAULT '0.000', changed from float to dec so you have no rounding issue
---
server_ObjectPublish.sqf / server_PuglishObject.sqf:
_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], _fuel,_uid];
---
this work for me perfectly... but results another small problem.
if i build a tent now (from item) it will not saved because i think it not forward the fuel number (0 should be good)
i hope this helps you guys.
i would be happy if somebody can help me now to save some time for my issue!
maybe i can make an if/else routine that give the tent the _fuel to 0.000 if its <null> and / or undefined when u build it?
Cheers Guys
I hope it works for you guys too now![]()
private ["_class","_uid","_charID","_object","_worldspace","_key","_code","_fuel"];
//[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
//put in normal code for basebuilding
} else {
normal code which you would need for all other objects
};
@[La.usch.io]
http://opendayz.net/threads/release...ycode-permanent-owner.10485/page-2#post-46731
Just do it like in this post
put inside this
Code:private ["_class","_uid","_charID","_object","_worldspace","_key","_code","_fuel"]; //[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 //put in normal code for basebuilding } else { normal code which you would need for all other objects };
Should work.
23:51:33 "DEBUG: Deleting object TentStorage with invalid ID at [6885.52,11462.5,0.000793457]"
Tried this fix...then instead of tents simply not saving, you place them and the server removes them immediately after with this:
Code:23:51:33 "DEBUG: Deleting object TentStorage with invalid ID at [6885.52,11462.5,0.000793457]"
hey Phoenix, had the same problem. i was not sure its in relation to BB so i dont posted it before...
so this is the way to get it working:
server_objectUpdate.sqf / server_updateObject.sqf
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then {
_object_position = getPosATL _object;
diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]", typeOf _object, _object_position select 0, _object_position select 1, _object_position select 2];
_isNotOk = true;
};
};
if (_isNotOk) exitWith { deleteVehicle _object; };
change too
if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0" && (vehicle _object getVariable ["Sarge",0] != 1)) then {
_object_position = getPosATL _object;
diag_log format ["DEBUG: Deleting object %1 with invalid ID at [%2,%3,%4]", typeOf _object, _object_position select 0, _object_position select 1, _object_position select 2];
_isNotOk = true;
};
};
//if (_isNotOk) exitWith { deleteVehicle _object; };
---
Cheers
L@usch
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:32:46 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:00 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:12 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:15 Server: Object 3:155 not found (message 94)
22:33:15 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:16 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 Server: Object 3:157 not found (message 70)
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:17 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:30 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:42 "DEBUG: Deleting object TentStorage with invalid ID at [6885.76,11463.1,0.000823975]"
22:33:52 "DELETE: Deleted by UID: 0"
// Send to database
_fuel = _code / 1000; //added to calculate valid fuel value for the database
_object setVariable ["characterID",dayz_playerUID,true];
dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_code]; //added _code to pass to the publishObj function to prevent calculation errors
publicVariableServer "dayzPublishObj";
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};
if ((typeOf _object) in allbuildables_class) then { // Send to database if part of the buildlist array
_fuel = _code / 1000; //added to calculate valid fuel value for the database
_object setVariable ["characterID",dayz_playerUID,true];
dayzPublishObj = [dayz_playerUID,_object,[_dir,_location],_classname,_fuel,_code]; //added _code to pass to the publishObj function to prevent calculation errors
publicVariableServer "dayzPublishObj";
} else { //Send to database if part of _allowedObjects
_object setVariable ["characterID",dayz_characterID,true];
dayzPublishObj = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "dayzPublishObj";
};
} else { //Exits construction if you don't have the exact materials
cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];
call _funcExitScript;
};
16:10:43 "DEBUG: Checking if Object: 1f9d0800# 1055591: a_tent.p3d REMOTE is allowed published by Server"
16:10:43 "DEBUG: Object: 1f9d0800# 1055591: a_tent.p3d REMOTE published by Server is Safe"
16:10:43 Error in expression <uel = _this select 4;
_code = _this select 5;
_allowed = [_object, "Ser>
16:10:43 Error position: <select 5;
_allowed = [_object, "Ser>
16:10:43 Error Zero divisor
16:10:43 File z\addons\dayz_server\compile\server_publishObject.sqf, line 8