Jump to content
  • 0

Error in expression


TheSquatch

Question

I cant seem to figure this out. Probably because I haven't slept in 24 hours. Been trying to get this server ready for lunch on the 1st of April.

 

Note this is a fresh install or Overpoch and it was working just fine a few days ago. I havent added anything new just moved the files from the beta server to the new server.



RTF this is the only error I'm getting.

9:11:41 "HIVE: Starting"
9:11:41 "HIVE: trying to get objects"
9:11:41 "HIVE: found 1834 objects"
9:11:41 "HIVE: Commence Object Streaming..."
9:11:41 "HIVE: got 1503 Epoch Objects and 331 Vehicles"
9:11:41 Error in expression <then
{
_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then >
9:11:41 Error position: <count (_worldspace select 1) == 3) then >
9:11:41 Error count: Type String, expected Array,Config entry
9:11:41 File z\addons\dayz_server\system\server_monitor.sqf, line 108



server_monitor.sqf lines 91 to 119:

{
_idKey = _x select 1;
_type = _x select 2;
_ownerID = _x select 3;

_worldspace = _x select 4;
_inventory = _x select 5;
_hitPoints = _x select 6;
_fuel = _x select 7;
_damage = _x select 8;

_dir = 0;
_pos = [0,0,0];
_wsDone = false;
if (count _worldspace >= 2) then
{
_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then {
_pos = _worldspace select 1;
_wsDone = true;
}
};

if (!_wsDone) then {
if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
_pos = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
};




Thanks in advance for any help.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

Eveything was new both the SQL server and Game server. Nothing had been added to the new SQL database.

 

So I discovered that if I wipe everything out of the objects_data then the server loads up fine. Problem is this new server is suppos to replace the old server and I need to keep all of the items in objects_data.

 

I simply duped the database to the new SQL box and copied all of my modified server files onto the freshly installed DayZ box. Note the OS was the same I just moved the server to new hardwere.

Link to comment
Share on other sites

  • 0

I am pretty sure that error is because the buildables in the object_data table have vector or snap attributed to them and the server files do not, or vice versa. I have seen a similar error when building a new server and testing it out on an older, used database. 

Link to comment
Share on other sites

  • 0

That's one reason why I'm confused.

I was running the old server and the new server of the same SQL database.

Wail writing this I did think of something.

The only change I made was splitting up the players and objects as if it was in a hive system. Players want to expand to new maps so no other option.

I bet that is what happened. because If I tell it to use the old SQL server from the new Game Box it runs fine.

Well my guess is that I will just have to delete every build-able in the server and everyone will just have to suck it up. It wont be to bad because the server got nuked a few days ago and everything was lost because the backup scripts where corrupt.

Thanks for the help. It has been greatly appreciated.

Link to comment
Share on other sites

  • 0

I have the same error: Error in expression <then

{
_dir = _worldspace select 0;
if (count (_worldspace select 1) == 3) then >
 2:33:36   Error position: <count (_worldspace select 1) == 3) then >
 2:33:36   Error count: Type String, expected Array,Config entry
 2:33:36 File custom\system\server_monitor.sqf, line 105
 
This is a test server so I am not adding anything new. Like above if I wipe the object_data table the server will restart fine, but as soon as I build anything and restart the server I get the above error.  I am not importing anything from an old server, just simply building something new.  
 
My installed scripts are A Plot for Life 2.5 which includes Precise Base Building and Snap-Pro.  I also have Vectors installed.   
This is an example of what an object in world space looks like:
["355.169647","10999.567383,17277.123047,1.0469246]","76561197960443125",[[-0.084,0.996,0],[0,0,1]]]
 
As said above the this object has the the vectors and snap attributed to it.  
 
I really need help with this as I have dug around a lot trying to get an answer to this.
Link to comment
Share on other sites

  • 0

In an effort to insure there could be no conflicts with my above problem. I stripped my server down to no mods except for the ones listed above, and after the redo I get the same error and problem!  The server runs fine with just A Plot for Life, but breaks after I add Vectors and build something then restart the server.  The only things in the object_data table are the items I build for testing.  I am sure I am not the only person that has run into this problem!

Link to comment
Share on other sites

  • 0

I finally figured it out and will write it here so others like me might avoid long hours of pulling hair.  The problem was in the server_monitor.sqf.  When installing vectors after installing A Plot for Life 2.5 the directions in vectors states:

"Start by opening your **server_monitor.sqf**(Remove anything done from P4L installation) which is located in the system folder and find the following code block"

 

The problem with this statement is there is code that was put in by A Plot for Life that is needed: 

if ((typeName (_worldspace select 0)) == "STRING") then {

    _worldspace set [0, call compile (_worldspace select 0)];
    _worldspace set [1, call compile (_worldspace select 1)];};
 
It should look like this: 
_pos = [0,0,0];
_wsDone = false;
if (count _worldspace >= 2) then
{
     if ((typeName (_worldspace select 0)) == "STRING") then {
         _worldspace set [0, call compile (_worldspace select 0)];
         _worldspace set [1, call compile (_worldspace select 1)];
     };
     _dir = _worldspace select 0;
     if (count (_worldspace select 1) == 3) then {
          _pos = _worldspace select 1;
          _wsDone = true;
     }
};
So it should not be said to disregard everything done by A Plot for Life, because if you do that part of the code will be left out and you will get the error I described above.  If you use the server_monitor.sqf file provided by A Plot for Life then be careful when you see the instructions: 
 
Once that is complete, find this next line:
```
_object setVariable ["ObjectID", _idKey, true];
```
And place the following after it:
```
_object setVariable ["ownerPUID", _ownerPUID, true];
```
 
That line is already in the script so if you are not paying attention you will apply the same line twice.

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...