hmmm yeah, ok i think i'm beginning to understand. It's a shame but i guess these are the limitations of the underlying code. thanks once again for your help.
Ok I'm obviously missing something extremely fundamental here, so I'm going to go through it step by step:
1. I create a new object:
23:06:40 "DEBUG: Checking if Object: 1755dd00# 1056727: fort_bagfence_long.p3d REMOTE is allowed published by Server"
23:06:40 "DEBUG: Object: 1755dd00#...
yeah it logs to client rpt. and I get a value for _objectUID, and a 0 value for_objectID. But it doesn't delete, as mentioned it just creates new entry in the db.
but then if I create a *new* object it also has _object=0, but yet it does delete properly and recreate with a new code.
it is...
yeah. at least i think so. here's the bit from codeCheck.sqf which i changed:
PVDZ_obj_Delete = [_objectID,_objectUID]; //prepare global array to pass variables to the delete function
publicVariableServer "PVDZ_obj_Delete";
if (isServer) then {
PVDZ_obj_Delete call...
Hi. Ok, interesting... editing the objects code is now adding a new object to the db with the updated code, but the old object is not being deleted. Similarly just deleting an object is not removing it from the db. server_deleteObj.sqf is being called, _id=0 so it's attempting to delete by _uid.
Thanks. Do you mean in this bit:
if (_damage < 1) then { // create object
diag_log("Spawned: " + str(_ObjectID) + " " + _class);
// for tents: non colliding position
_entity = createVehicle [_class, _point, [], 0,
if...
getting down to what i think the problem is. Here's server_deleteObj.sqf:
This is standard I think. At least I haven't modified it. Basically with a new object, _id=0, and if you send that _key array through to server_hiveWrite it works - and removes the item from the db. Anything else does...
Looking at that again, I'm wondering if
_entity setVariable ["Classname", _type, true]; //set Classname to the Object
should be
_entity setVariable ["Classname", _class, true]; //set Classname to the Object
and whether it would make a difference to me problem... I don't know.
Actually I'm not sure your tent fix is working for overwatch... I mean it's working in the sense that tents and other objects are persistent across restart, in the section for 1.8 only (or overwatch 0.2.5) you say do this:
// Don't set objects for deployables to ensure proper inventory...
yeah. Objects spawn as the correct objects - so, a bagfence spawns as a bagfence, and in the correct position. But after a restart I am unable to delete the object (as owner) - no errors in rpt or hive log, it removes ingame and refunds components, but does not remove from db. Also after restart...
been playing with this on and off the last couple of days, not really any closer to sorting it out. Going to have to give up on it at some point I guess. Anyway the strangeness continues... at server start server_monitor seems to be deploying recently built objects with odd classnames...
Thanks. I've been playing about with it some more... changed the relevant section of server_monitor to this:
// ##### BASE BUILDING 1.2 Server Side ##### - START
// This sets objects to appear properly once server restarts
//_object setVariable ["ObjectUID", _worldspace call...
hmm thanks, interesting. yes i see there are no other references to _object in my server_monitor. should it be using _entity instead? i'm just stumbling around in the dark here - i don't understand this code well enough :(
Ok it seems to be happening with all objects, post restart. Changing the code on an object created since the last restart seems to work fine. I wonder if its got something to do with this:
18:23:15 "Spawned: "13861241640180" TentStorage"
18:23:15 Error in expression < _damage;
_code = _fuel...
hmmm I got another strange one:
I have 2 buildable objects, one recently created and one which has existed for a long time (before putting kikyo's improvements in). If I try to edit the code on the newer object, it works perfectly. However on the older object, it gets deleted from the db but...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.