Base Building DayZ 1.2 Released

Hi folks, I have had Daimyo21's base building script running flawlessly on 1.7.6.1 Chernarus on Rmod and non Rmod servers without any issues - Keypads, gates and extra build-able items added too.

Since updating to 1.7.7.1 I have the scroll wheel menu for build recipes working which correctly shows the in-game build list and you can correctly build all the items and the items appear in game. However nothing is being written to the database instance_deployable table and therefore everything built disappears after a server reboot.

One thing i have noticed in 1.7.7.1 is that the scroll wheel save option for vehicles and tents is back. I have thought that the option of adding a "save object" scroll wheel option when you are interacting with a basebuild deployed object might help with writing object to the database (calling the server_PublishObject etc) but this still leaves the main issue that the publishing / saving to the database is broken in the first place.

If I get it solved I will post my findings. Would love to hear from Daimyo21 or anyone else on this...
Daimyo21 has made a great mod, let's keep it alive.


Do you have the buildables in your deployables table?

What errors do you have in your hiveext/rpt logs?
 
Ok back again after a quick test... When I build a basebuilt object i get this in the HiveExt.log

2013-06-24 09:39:07 HiveExt: [Error] Error executing |CHILD:305::[76,[10314.8,2147.38,0.00166035]]:1:|
2013-06-24 09:39:12 HiveExt: [Error] Error executing |CHILD:305::[76,[10314.8,2147.38,0.00166225]]:1:|


However as tents save correctly to the database when I build a tent I get this in the arma2oaserver.RPT

9:45:53 "DEBUG: Checking if Object: 315c4100# 1058719: a_tent.p3d REMOTE is allowed published by Server"
9:45:53 "DEBUG: Object: 315c4100# 1058719: a_tent.p3d REMOTE published by Server is Safe"
9:45:53 "PUBLISH: Created TentStorage with ID 22476208270361"
9:46:01 "HIVE: WRITE: "CHILD:309:22476208270361:[[[],[]],[[],[]],[[],[]]]:""


Im going to poke around and see if I can get base build objects to be passed as CHILD:309 instead of 305 and see what happens. Other than that it looks like something could be wrong with the Dayz_server\init\server_functions.sqf"
with this...
if ((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class) then {
 
I have attempted building a few objects whilst watching the logs and I cannot reproduce the child 305 error when I build a base built object --- the log file goes blank and there is absolutely no trace of anything being build or deployed etc... Within the timestamps shown on the log I tried to build 3 different objects... all of them appear in game just fine but nothing is written to the database and the log looks like this:

10:04:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:05:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:05:52 "DEBUG FPS : 42.328"
10:06:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:07:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:08:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:08:53 "DEBUG FPS : 43.0108"
10:09:26 "CLEANUP:TOTAL 358 LOOT BAGS"
10:10:26 "CLEANUP:TOTAL 358 LOOT BAGS"

When I build a tent though this is what is shown in the log:

10:12:53 "DEBUG: Checking if Object: 315c4100# 1058719: a_tent.p3d REMOTE is allowed published by Server"
10:12:53 "DEBUG: Object: 315c4100# 1058719: a_tent.p3d REMOTE published by Server is Safe"
10:12:53 "PUBLISH: Created TentStorage with ID 22476208270361"
10:13:01 "HIVE: WRITE: "CHILD:309:22476208270361:[[[],[]],[[],[]],[[],[]]]:""

Im going to dig around a bit and see how tents are being handled compared to whats going on in:
((typeOf _object) in _allowedObjects || (typeOf _object) in allbuildables_class)
 
Well I just finished my first attempt under 1.7.7.1, got all my batteeye exceptions sorted and pretty much followed daimyos manual instructions, only difference was the fn_selfactions for which I used 1.7.7.1 as my base.

I have nothing saving to the database either right now and no errors in hiveext or rpt files, too tired to continue trying tonight but I will let you know if I get it working fully tomorrow.

I remember months back when I originally set it up for 1.7.6.1 I had a similar issue and there was a manual fix for it posted in the early pages of this thread. Not sure if daimyo merged this change in with his code by now though.
 
Well I just finished my first attempt under 1.7.7.1, got all my batteeye exceptions sorted and pretty much followed daimyos manual instructions, only difference was the fn_selfactions for which I used 1.7.7.1 as my base.

I have nothing saving to the database either right now and no errors in hiveext or rpt files, too tired to continue trying tonight but I will let you know if I get it working fully tomorrow.

I remember months back when I originally set it up for 1.7.6.1 I had a similar issue and there was a manual fix for it posted in the early pages of this thread. Not sure if daimyo merged this change in with his code by now though.


Sounds like we are at the same point as each other seaweed. I also used the new 1.7.7.1 self actions and merged in the the base build changes but my understanding is that the self_actions influences the mouse scroll wheel menu options. If we are getting the scroll wheel option in game the issue is not with the self actions file.

Next stop is "dayz_server\init\server_functions.sqf" I'll have a skim through now trying to see how tents are being handled differently from the build array as tents seem to be saving to DB and logfiles correctly.

I am also running out energy tonight but will update with any progress tomorrow.
 
38 Pages later and with a second thread containing and "improved" version and people still cant get it to work?

Exactly the reason I gave up!
 
Sounds like we are at the same point as each other seaweed. I also used the new 1.7.7.1 self actions and merged in the the base build changes but my understanding is that the self_actions influences the mouse scroll wheel menu options. If we are getting the scroll wheel option in game the issue is not with the self actions file.

Next stop is "dayz_server\init\server_functions.sqf" I'll have a skim through now trying to see how tents are being handled differently from the build array as tents seem to be saving to DB and logfiles correctly.

I am also running out energy tonight but will update with any progress tomorrow.


I think the way built items are added may have changed. From looking at the clientside 1.7.7.1 player_build.sqf and comparing it to the one in basebuilding I think these changes may be required to the basebuilding player_build.sqf

Code:
// Send to database
_object setVariable ["characterID",dayz_characterID,true];
PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "PVDZ_obj_Publish";
    if (isServer) then {
        PVDZ_obj_Publish call server_publishObj;
    };
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};

Just guessing at the moment though as I am at work and can't test any changes till later, pretty sure I didn't see all these PVDZ_ variables I've been seeing in the code recently until 1.7.7.1 was released, just guessing currently though. I still need to re-install 1.7.6.1 and take a look at the old player_build.sqf to see what changed clientside between the two patches. If I wasn't at work this would be my next step :)
 
I think the way built items are added may have changed. From looking at the clientside 1.7.7.1 player_build.sqf and comparing it to the one in basebuilding I think these changes may be required to the basebuilding player_build.sqf

Code:
// Send to database
_object setVariable ["characterID",dayz_characterID,true];
PVDZ_obj_Publish = [dayz_characterID,_object,[_dir,_location],_classname];
publicVariableServer "PVDZ_obj_Publish";
    if (isServer) then {
        PVDZ_obj_Publish call server_publishObj;
    };
} else {cutText ["You need the EXACT amount of whatever you are trying to build without extras.", "PLAIN DOWN"];call _funcExitScript;};

Just guessing at the moment though as I am at work and can't test any changes till later, pretty sure I didn't see all these PVDZ_ variables I've been seeing in the code recently until 1.7.7.1 was released, just guessing currently though. I still need to re-install 1.7.6.1 and take a look at the old player_build.sqf to see what changed clientside between the two patches. If I wasn't at work this would be my next step :)


I tested the code above and it does indeed write base built objects to to the database! very good find seaweed!!! However... after my initial excitement I noticed it seems to have now caused tent and vehicle inventories as well as vehicle worldspace co-ordinates not to update at all. Both vehicle and tents worked just fine before adding the above suggested code and the visads latest commits from github.

Seaweed, when you get a chance if you could confirm it's doing the same thing for you RE: vehicles and tents that would be super.

Also, after adding the above code; the log files were spamming errors like crazy for every single vehicle like this:

if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
21:46:49 Error position: <_objectID == "0" && _uid == "0") then {
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 34
21:46:49 "DEBUG: Monitoring: 24794100# 1056488: ural.p3d"
21:46:49 Error in expression <le ["ObjectUID","0"];};

if ((typeName _objectID != "string") || (typeName _uid>
21:46:49 Error position: <_objectID != "string") || (typeName _uid>
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 23
21:46:49 "z\addons\dayz_code\compile\veh_handleDam.sqf _this:[24794100# 1056488: ural.p3d,"karoserie",1] vehicle:Ural_INS# part:"karoserie" current_part_damage:0. setH!t[karoserie,1]. Writing to hive. Returned damage:1"
21:46:49 Error in expression <0";
};

if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
21:46:49 Error position: <_objectID == "0" && _uid == "0") then {
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 34
21:46:49 "DEBUG: Monitoring: 24794100# 1056488: ural.p3d"
21:46:49 Error in expression <le ["ObjectUID","0"];
};

and this :

2013-06-24 21:46:32 HiveExt: [Error] Error executing |CHILD:305::[155,[12160.7,3469.85,0.0106673]]:1:|
2013-06-24 21:46:43 HiveExt: [Error] Error executing |CHILD:305::[151,[6596.72,2904.84,0.104511]]:1:|
2013-06-24 21:46:49 HiveExt: [Error] Error executing |CHILD:305::[332,[8859.4,2896.59,0.446213]]:1:|
2013-06-24 21:54:32 HiveExt: [Error] Error executing |CHILD:305::[156,[7659.99,3981.68,-0.035984]]:1:|
2013-06-24 21:56:41 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.18,2198.58,-0.0522041]]:0.987391:|
2013-06-24 21:56:51 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.16,2198.58,-0.0525436]]:0.986476:|
2013-06-24 21:56:53 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0531492]]:0.986247:|
2013-06-24 21:56:54 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0539498]]:0.986096:|
2013-06-24 21:58:30 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0438132]]:0.983564:|
2013-06-24 23:03:33 HiveExt: [Error] Error executing |CHILD:305::[0,[11546.5,3380.94,0.00817776]]:1:|


I managed to get rid of all of these errors and get clean looking log files by adding in the visads recent commits from here...
https://github.com/thevisad/DayZ-Private-master/commit/560e95126b6289d8943d369d143f8a4167f93e3d

Although the log files are now looking good with no errors and basebuild object are saving to the database... Tent and vehicle inventories and vehicle worldspaces are not updating at all. However the log files suggest that something should be happening... here is a snip of the the log file of me with a vehicle after above fixes but nothing happens on the database.

0:47:54 "HIVE: WRITE: "CHILD:306:2477:[["glass1",0],["glass2",0],["glass3",0.1],["glass4",0],["wheel_1_1_steering",0.1],["wheel_1_2_steering",0],["wheel_2_1_steering",0],["wheel_2_2_steering",0],["motor",0],["sklo predni P",0],["sklo predni L",0],["karoserie",0],["palivo",0.8],["wheel_1_4_steering",0],["wheel_2_4_steering",0],["wheel_1_3_steering",0],["wheel_2_3_steering",0]]:0:""
0:48:12 "HIVE: WRITE: "CHILD:305:0:[197,[6068.68,10499.8,-0.000793457]]:0.96286:""
0:48:12 "HIVE: WRITE: "CHILD:309:2477:[[["m16a4_acg","Makarov","ItemEtool","ItemFlashlight","ItemHatchet","ItemKnife","ItemMap"],[1,1,1,1,1,1,1]],[["30Rnd_556x45_Stanag","ItemWaterbottle","HandRoadFlare","ItemTankTrap","ItemSodaCoke","8Rnd_9x18_Makarov"],[2,1,3,1,1,4]],[["DZ_Patrol_Pack_EP1"],[1]]]:""
0:48:12 "HIVE: WRITE: "CHILD:306:2477:[["glass1",0],["glass2",0],["glass3",0.1],["glass4",0],["wheel_1_1_steering",0.1],["wheel_1_2_steering",0],["wheel_2_1_steering",0],["wheel_2_2_steering",0],["motor",0],["sklo predni P",0],["sklo predni L",0],["karoserie",0],["palivo",0.8],["wheel_1_4_steering",0],["wheel_2_4_steering",0],["wheel_1_3_steering",0],["wheel_2_3_steering",0]]:0:""

I'm at another dead end at the moment as the log files are not giving me many clues to go on here.
Im going to look through the self actions again to see whats being executed for the save tent / save vehicle scroll wheel action
 
Hi,
do someone have the exact actions to add to the AH.sqf antihack script to make base building working well for players ?
Thanks in advance !
 
I realize that you all are trying to get it to work with the new version of dayz but can someone tell me how to get the infostand and gate to build and stay with version 1.7.4.4 on tavi?
 
I tested the code above and it does indeed write base built objects to to the database! very good find seaweed!!! However... after my initial excitement I noticed it seems to have now caused tent and vehicle inventories as well as vehicle worldspace co-ordinates not to update at all. Both vehicle and tents worked just fine before adding the above suggested code and the visads latest commits from github.

Seaweed, when you get a chance if you could confirm it's doing the same thing for you RE: vehicles and tents that would be super.

Also, after adding the above code; the log files were spamming errors like crazy for every single vehicle like this:

if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
21:46:49 Error position: <_objectID == "0" && _uid == "0") then {
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 34
21:46:49 "DEBUG: Monitoring: 24794100# 1056488: ural.p3d"
21:46:49 Error in expression <le ["ObjectUID","0"];};

if ((typeName _objectID != "string") || (typeName _uid>
21:46:49 Error position: <_objectID != "string") || (typeName _uid>
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 23
21:46:49 "z\addons\dayz_code\compile\veh_handleDam.sqf _this:[24794100# 1056488: ural.p3d,"karoserie",1] vehicle:Ural_INS# part:"karoserie" current_part_damage:0. setH!t[karoserie,1]. Writing to hive. Returned damage:1"
21:46:49 Error in expression <0";
};

if (!_parachuteWest) then {
if (_objectID == "0" && _uid == "0") then {
21:46:49 Error position: <_objectID == "0" && _uid == "0") then {
21:46:49 Error Undefined variable in expression: _objectid
21:46:49 File z\addons\dayz_server\compile\server_updateObject.sqf, line 34
21:46:49 "DEBUG: Monitoring: 24794100# 1056488: ural.p3d"
21:46:49 Error in expression <le ["ObjectUID","0"];
};

and this :

2013-06-24 21:46:32 HiveExt: [Error] Error executing |CHILD:305::[155,[12160.7,3469.85,0.0106673]]:1:|
2013-06-24 21:46:43 HiveExt: [Error] Error executing |CHILD:305::[151,[6596.72,2904.84,0.104511]]:1:|
2013-06-24 21:46:49 HiveExt: [Error] Error executing |CHILD:305::[332,[8859.4,2896.59,0.446213]]:1:|
2013-06-24 21:54:32 HiveExt: [Error] Error executing |CHILD:305::[156,[7659.99,3981.68,-0.035984]]:1:|
2013-06-24 21:56:41 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.18,2198.58,-0.0522041]]:0.987391:|
2013-06-24 21:56:51 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.16,2198.58,-0.0525436]]:0.986476:|
2013-06-24 21:56:53 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0531492]]:0.986247:|
2013-06-24 21:56:54 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0539498]]:0.986096:|
2013-06-24 21:58:30 HiveExt: [Error] Error executing |CHILD:305::[253,[5927.15,2198.58,-0.0438132]]:0.983564:|
2013-06-24 23:03:33 HiveExt: [Error] Error executing |CHILD:305::[0,[11546.5,3380.94,0.00817776]]:1:|


I managed to get rid of all of these errors and get clean looking log files by adding in the visads recent commits from here...
https://github.com/thevisad/DayZ-Private-master/commit/560e95126b6289d8943d369d143f8a4167f93e3d

Although the log files are now looking good with no errors and basebuild object are saving to the database... Tent and vehicle inventories and vehicle worldspaces are not updating at all. However the log files suggest that something should be happening... here is a snip of the the log file of me with a vehicle after above fixes but nothing happens on the database.

0:47:54 "HIVE: WRITE: "CHILD:306:2477:[["glass1",0],["glass2",0],["glass3",0.1],["glass4",0],["wheel_1_1_steering",0.1],["wheel_1_2_steering",0],["wheel_2_1_steering",0],["wheel_2_2_steering",0],["motor",0],["sklo predni P",0],["sklo predni L",0],["karoserie",0],["palivo",0.8],["wheel_1_4_steering",0],["wheel_2_4_steering",0],["wheel_1_3_steering",0],["wheel_2_3_steering",0]]:0:""
0:48:12 "HIVE: WRITE: "CHILD:305:0:[197,[6068.68,10499.8,-0.000793457]]:0.96286:""
0:48:12 "HIVE: WRITE: "CHILD:309:2477:[[["m16a4_acg","Makarov","ItemEtool","ItemFlashlight","ItemHatchet","ItemKnife","ItemMap"],[1,1,1,1,1,1,1]],[["30Rnd_556x45_Stanag","ItemWaterbottle","HandRoadFlare","ItemTankTrap","ItemSodaCoke","8Rnd_9x18_Makarov"],[2,1,3,1,1,4]],[["DZ_Patrol_Pack_EP1"],[1]]]:""
0:48:12 "HIVE: WRITE: "CHILD:306:2477:[["glass1",0],["glass2",0],["glass3",0.1],["glass4",0],["wheel_1_1_steering",0.1],["wheel_1_2_steering",0],["wheel_2_1_steering",0],["wheel_2_2_steering",0],["motor",0],["sklo predni P",0],["sklo predni L",0],["karoserie",0],["palivo",0.8],["wheel_1_4_steering",0],["wheel_2_4_steering",0],["wheel_1_3_steering",0],["wheel_2_3_steering",0]]:0:""

I'm at another dead end at the moment as the log files are not giving me many clues to go on here.
Im going to look through the self actions again to see whats being executed for the save tent / save vehicle scroll wheel action


I think you have made a mistake somewhere, I made the same change just now, not having any problems with vehicles saving position damage or inventories after a restart.

Newly built buildings are saving database side, after restart the test one I built wasn't visible but is still in the db. I am going to check I didn't miss something from the original basebuilding instructions before I try and debug whatever is going on....

edit: out of time tonight I'm afraid, I can confirm I have 0 errors in my rpt logs though, just seems to be the publishing of the basebuilding objects that is missing. I've been looking at server_publishobject.sqf in the server pbo for clues. Not sure at the moment though....
 
I think you have made a mistake somewhere, I made the same change just now, not having any problems with vehicles saving position damage or inventories after a restart.

Newly built buildings are saving database side, after restart the test one I built wasn't visible but is still in the db. I am going to check I didn't miss something from the original basebuilding instructions before I try and debug whatever is going on....

edit: out of time tonight I'm afraid, I can confirm I have 0 errors in my rpt logs though, just seems to be the publishing of the basebuilding objects that is missing. I've been looking at server_publishobject.sqf in the server pbo for clues. Not sure at the moment though....

You need to edit your dayz_code.pbo for those objects to be considered "safe", this is done in the init folder in variables.sqf

it needs to look like this
SafeObjects = ["Land_Fire_DZ","TentStorage", "Hedgehog_DZ", "Sandbag1_DZ", "TrapBear", "Wire_cat1", "StashSmall", "StashMedium", "Grave", "Concrete_Wall_EP1", "Infostand_2_EP1", "WarfareBDepot", "Base_WarfareBBarrier10xTall", "WarfareBCamp", "Base_WarfareBBarrier10x", "Land_fortified_nest_big", "Land_Fort_Watchtower", "Land_fort_rampart_EP1", "Land_HBarrier_large", "Land_fortified_nest_small", "Land_BagFenceRound", "Land_fort_bagfence_long", "Land_Misc_Cargo2E", "Misc_Cargo1Bo_military", "Ins_WarfareBContructionSite", "Land_pumpa", "Land_CncBlock", "Misc_cargo_cont_small_EP1", "Land_prebehlavka", "Fence_corrugated_plate", "ZavoraAnim", "Land_tent_east", "Land_CamoNetB_EAST", "Land_CamoNetB_NATO", "Land_CamoNetVar_EAST", "Land_CamoNetVar_NATO", "Land_CamoNet_EAST", "Land_CamoNet_NATO", "Fence_Ind_long", "Fort_RazorWire", "Fence_Ind"];

PS. Can someone confirm that this works? I have not tested the changes that make it write to database, but this is what i did to make my bases from 1.7.6.1 show up even though new ones could not be added - hoping with adding the code suggested i can get it to write to database and alongside this dayz_code.pbo edit will allow base building to function on 1.7.7.1
 
You need to edit your dayz_code.pbo for those objects to be considered "safe", this is done in the init folder in variables.sqf

it needs to look like this


PS. Can someone confirm that this works? I have not tested the changes that make it write to database, but this is what i did to make my bases from 1.7.6.1 show up even though new ones could not be added - hoping with adding the code suggested i can get it to write to database and alongside this dayz_code.pbo edit will allow base building to function on 1.7.7.1


Awesome thanks I will try this as soon as I get home tonight
 
It works, the publishing to database seems to be the only issue left...

DayZ 1.7.7.1


I already shared the code to fix publishing to the database

How are you testing if a database built deployable spawns on server restart if yours aren't saving to the database?
 
IDK if this has been mentioned yet, but I noticed Seaweeduk that you changed the PublicVariable for publishing to the database in player_build.sqf to be PVDZ_obj_Publish; shouldn't the player_remove.sql be PVDZ_obj_Delete wherever referenced? Can you check my code to see if I'm correct on this?

I have been getting kicked for PublicVariable Restriction #0 for both setting and trying to remove since 1.7.7/1.7.7.1

Thanks!

Code:
    cutText [format["Owner refunded for object %1",typeof(_obj)], "PLAIN DOWN",1];
        PVDZ_obj_Delete = [_objectID,_objectUID];
    publicVariableServer "PVDZ_obj_Delete";
    if (isServer) then {
        PVDZ_obj_Delete call local_deleteObj;
    };
        deletevehicle _obj;
        breakout "exit";
 
};

and:

Code:
//Player removes object successfully
if (!isNull _obj) then {
cutText [format["You removed a %1 successfully!",_text], "PLAIN DOWN"];
//    PVDZ_obj_Delete = [_dir, _pos, _objectID, _objectUID];
    PVDZ_obj_Delete = [_objectID,_objectUID];
publicVariableServer "PVDZ_obj_Delete";
//if (isServer) then {
//    PVDZ_obj_Delete call local_deleteObj;
//};
if (isServer) then {
PVDZ_obj_Delete call server_deleteObj;
};
sleep .1;
deleteVehicle _obj;
};
 
IDK if this has been mentioned yet, but I noticed Seaweeduk that you changed the PublicVariable for publishing to the database in player_build.sqf to be PVDZ_obj_Publish; shouldn't the player_remove.sql be PVDZ_obj_Delete wherever referenced? Can you check my code to see if I'm correct on this?

I have been getting kicked for PublicVariable Restriction #0 for both setting and trying to remove since 1.7.7/1.7.7.1

Thanks!

Code:
    cutText [format["Owner refunded for object %1",typeof(_obj)], "PLAIN DOWN",1];
        PVDZ_obj_Delete = [_objectID,_objectUID];
    publicVariableServer "PVDZ_obj_Delete";
    if (isServer) then {
        PVDZ_obj_Delete call local_deleteObj;
    };
        deletevehicle _obj;
        breakout "exit";
 
};

and:

Code:
//Player removes object successfully
if (!isNull _obj) then {
cutText [format["You removed a %1 successfully!",_text], "PLAIN DOWN"];
//    PVDZ_obj_Delete = [_dir, _pos, _objectID, _objectUID];
    PVDZ_obj_Delete = [_objectID,_objectUID];
publicVariableServer "PVDZ_obj_Delete";
//if (isServer) then {
//    PVDZ_obj_Delete call local_deleteObj;
//};
if (isServer) then {
PVDZ_obj_Delete call server_deleteObj;
};
sleep .1;
deleteVehicle _obj;
};


Yeah changes are could be required there too, I hadn't got as far as checking the removal code out. I will look at that once I have things showing up after restart...

As for the BE exceptions, you need to go through the code, see what is being run before the code you see in the BE logs and add an exception for it. I remember "SetV" for example was on of them caused by setVariable. It's a bit of a pain for public variable ones because it will always say line 0 for the kick, when in fact its a specific line number in the publicvariableval filters causing the kick. You can verify this by running with a blank publicvariableval file I think...

A lot of people on here seem to just stick a 1 infront of their kicks or comment them out, not exactly the smartest most secure way to go about doing things but it will work if you are struggling with it.
 
Someone please teach me for new constructions to be built and some scrit.txt batleeye for not taking the kick!!
 
Back
Top