Jump to content
  • 0

server_cleanup.fsm - Once and for all solve this :/


Sandbird

Question

I am so tired of this file....i've tried to update it 100000 times, and keep getting errors all the time.

diag_log ("CLEANUP: KILLIN>
19:37:20   Error position: <!= 1)) then {
diag_log ("CLEANUP: KILLIN>
19:37:20   Error Generic error in expression
19:37:20 Error in expression <& (vehicle _x getVariable ["Mission",0] != 1)) then {
diag_log ("CLEANUP: KILLIN>
19:37:20   Error position: <!= 1)) then {
diag_log ("CLEANUP: KILLIN>
19:37:20   Error Generic error in expression

My current function:

    class group_cleanup
    {
      name = "group_cleanup";
      init = /*%FSM<STATEINIT""">*/"//Check for hackers" \n
       " {" \n
			 "	if(vehicle _x != _x && !(vehicle _x in PVDZE_serverObjectMonitor) && (isPlayer _x)  && !((typeOf vehicle _x) in DZE_safeVehicle) && (typeOf vehicle _x) != ""ParachuteWest"" && (vehicle _x getVariable [""Mission"",0] != 1)) then {" \n	
			 "		diag_log (""CLEANUP: KILLING A HACKER "" + (name _x) + "" "" + str(_x) + "" IN "" + (typeOf vehicle _x));" \n
       "		(vehicle _x) setDamage 1;" \n
       "		_x setDamage 1;" \n
       "	 };" \n
       " } forEach allUnits;"/*%FSM</STATEINIT""">*/;
      precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
      class Links
      {
        /*%FSM<LINK "true">*/
        class true
        {
          priority = 0.000000;
          to="general_cleanup";
          precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
          condition=/*%FSM<CONDITION""">*/"true"/*%FSM</CONDITION""">*/;
          action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
        };
        /*%FSM</LINK>*/
      };
    };

I dont know if its related (probably is) but i get this as well:

19:59:29 Error in expression <
};


if (_object getVariable "Mission" == 1) exitWith {};


if (_object getVari>
19:59:29   Error position: <== 1) exitWith {};


if (_object getVari>
19:59:29   Error Generic error in expression
19:59:29 File z\addons\dayz_server\compile\server_updateObject.sqf, line 30

The line is obvious there:

 

if (_object getVariable "Mission" == 1) exitWith {};

 

Someone please give me a correct function: Using Missions only...

-Thanks

Link to comment
Share on other sites

Recommended Posts

  • 0

@icomrade

 

Who is using 3 dude....thats the error brackets....its not in evaluation....if you mean the post above you.

 

Error position: <!= 1) && !((typeOf vehicle _x) in DZE_sa>

Yup, I kind of missed that.

 

You could try rewriting the eval line like so, as far as I've seen/know ArmA will evaluate an if/then statement all the way through even if a condition is not satisfied.

_vehicleX = vehicle _x;
_sargeVar = _vehicleX getVariable ["Sarge", false];
if ((isPlayer _x) && (!isNil "_sargeVar")) then {
	if ((_vehicleX != _x) && !(_vehicleX in PVDZE_serverObjectMonitor) && (_sargeVar != 1) && !((typeOf _vehicleX) in DZE_safeVehicle)) then {

Link to comment
Share on other sites

  • 0

Hell if you still struggle with this issue. I would dump a bunch of diag_log lines before the if calls and see which variable is actually not getting set right. Then you can easily determine the next step like icomrade above suggests by setting default values yourself if they are not set. This should in theory clear the error you get and help you determine what is actually the source of the issue.

Link to comment
Share on other sites

  • 0

Hell if you still struggle with this issue. I would dump a bunch of diag_log lines before the if calls and see which variable is actually not getting set right. Then you can easily determine the next step like icomrade above suggests by setting default values yourself if they are not set. This should in theory clear the error you get and help you determine what is actually the source of the issue.

 

Yeah i did that on the test server....the spamming was crazy, but no errors there....i am afraid to do the same on the live server cause of the lag it will cause....But eventually i am gonna have to do that.

I am waiting for the bugs on 1.04 to settle down a bit, then after the upgrade i hope this error will disappear.

Link to comment
Share on other sites

  • 0

Yeah i did that on the test server....the spamming was crazy, but no errors there....i am afraid to do the same on the live server cause of the lag it will cause....But eventually i am gonna have to do that.

I am waiting for the bugs on 1.04 to settle down a bit, then after the upgrade i hope this error will disappear.

What was being spammed?

 

Also you could try squint for error/syntax checking (global/public/setVar variables will always give undefined error, unless all code is imported as a project), I wouldn't suggest coding on it, since it's an eyesore.

Link to comment
Share on other sites

  • 0

What was being spammed?

 

Also you could try squint for error/syntax checking (global/public/setVar variables will always give undefined error, unless all code is imported as a project), I wouldn't suggest coding on it, since it's an eyesore.

 

The diag_log was showing every single object that was passing from serverUpdate sqf...in the test server with just me in and it was 50+ lines....imagine on the actual server :P

That has to happen only for like 2-3 min...then close the server down and remove the diag_log and restart.....but with 30 people on the server it can be annoying for the players.

 

squint is nice....although it has some problems with private values...i use it but the problem is not a syntax error....some weird object or something i dont know....lands in the update function and breaks it....

I got no idea if thats the case...i am assuming it is....it could be the max vehicle limit value, or the dynamic_vehicles spawn places...it could be anything that makes this error.

Link to comment
Share on other sites

  • 0

I uploaded both Linux and Windows fixes to Github to solve this, 

 

as far as I know Windows works perfectly and also Linux works too which I use,

 

Current versions are 

Windows =  1.0.4.2

and

Linux =  1.0.4.1

 

https://github.com/deannreid/DayZEpoch-VehicleFix

i tried this and i get the following error still

 

if (!_parachuteWest >
17:52:29 Error position: <== 1) exitWith {};

if (!_parachuteWest >
17:52:29 Error Generic error in expression
17:52:29 File z\addons\dayz_server\compile\server_updateObject.sqf, line 28
17:52:39 Error in expression < && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:39 Error position: <!= 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:39 Error Generic error in expression
17:52:39 File z\addons\dayz_server\init\server_functions.sqf, line 798
17:52:55 Error in expression < && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:55 Error position: <!= 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:55 Error Generic error in expression
17:52:55 File z\addons\dayz_server\init\server_functions.sqf, line 798
17:53:38 Error in expression <"0";
};
if (_object getVariable "Sarge" == 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error position: <== 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error Generic error in expression
17:53:38 File z\addons\dayz_server\compile\server_updateObject.sqf, line 28
17:53:38 Error in expression <"0";
};
if (_object getVariable "Sarge" == 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error position: <== 1) exitWith {};
Link to comment
Share on other sites

  • 0

 

i tried this and i get the following error still

 

if (!_parachuteWest >
17:52:29 Error position: <== 1) exitWith {};

if (!_parachuteWest >
17:52:29 Error Generic error in expression
17:52:29 File z\addons\dayz_server\compile\server_updateObject.sqf, line 28
17:52:39 Error in expression < && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:39 Error position: <!= 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:39 Error Generic error in expression
17:52:39 File z\addons\dayz_server\init\server_functions.sqf, line 798
17:52:55 Error in expression < && (vehicle _x getVariable ["Sarge",0] != 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:55 Error position: <!= 1) && !((typeOf vehicle _x) in DZE_sa>
17:52:55 Error Generic error in expression
17:52:55 File z\addons\dayz_server\init\server_functions.sqf, line 798
17:53:38 Error in expression <"0";
};
if (_object getVariable "Sarge" == 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error position: <== 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error Generic error in expression
17:53:38 File z\addons\dayz_server\compile\server_updateObject.sqf, line 28
17:53:38 Error in expression <"0";
};
if (_object getVariable "Sarge" == 1) exitWith {};

if (!_parachuteWest >
17:53:38 Error position: <== 1) exitWith {};

you need to use the proper getVariable format.

_object getVariable ["Sarge", 0];
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...