[Support] DZMS DayZ Mission System

well maybe then I guess because you are adding the contents of the array to %1 which should be an array because its being counted below. ..
 
ZMSUnitsMajor = DZMSUnitsMajor + (units _unitGroup);

DZMSUnitsMajor is an array.

Look at DZMSInit.sqf

DZMSUnitsMajor = [];
 
I'm sure he has a reason to do what he is doing inside a format structure like that, but it is hard to follow. Took me a bit to see the error.
 
Here is the code from my server (the default code, just like on the github)
Code:
// load the unit groups into a passed array name so they can be cleaned up later
call compile format["
%1 = %1 + (units _unitGroup);
_unitMissionCount = count %1;
",_unitArrayName];

diag_log text format["[DZMS]: (%3) %1 AI Spawned, %2 units in mission.",count (units _unitGroup),_unitMissionCount,_unitArrayName];
and here is what my rpt says.
Code:
3:48:28 [DZMS]: Starting DayZ Mission System.
3:48:28 [DZMS]: DZAI Found! Using DZAI's Relations!
3:48:28 [DZMS]: Currently Running Version: RC1.1
3:48:28 [DZMS]: Outdated Configuration Detected! Please Update DZMS!
3:48:28 [DZMS]: Old Versions are not supported by the Mod Author!
3:48:28 [DZMS]: Mission and Extended Configuration Loaded!
3:48:28 [DZMS]: lingor Detected. Map Specific Settings Adjusted!
3:48:28 [DZMS]: DayZ Epoch Detected! Some Scripts Adjusted!
3:48:28 [DZMS]: Loading ExecVM Functions.
3:48:28 [DZMS]: Loading Compiled Functions.
3:48:28 [DZMS]: Loading All Other Functions.
3:48:28 [DZMS]: Mission Functions Script Loaded!
3:48:28 [DZMS]: Major Mission Clock Starting!
3:48:28 [DZMS]: Minor Mission Clock Starting!
3:48:28 [DZMS]: Mission Marker Loop for JIPs Starting!
3:48:33 [DZMS]: Running Major Mission SM1.
3:48:43 [DZMS]: (DZMSUnitsMajor) 6 AI Spawned, 6 units in mission.
3:48:48 [DZMS]: (DZMSUnitsMajor) 6 AI Spawned, 12 units in mission.
3:48:53 [DZMS]: (DZMSUnitsMajor) 4 AI Spawned, 16 units in mission.
3:48:59 [DZMS]: (DZMSUnitsMajor) 4 AI Spawned, 20 units in mission.
3:49:04 [DZMS]: (DZMSUnitsMajor) Waiting for 20/20 Units or Less to be Alive and a Player to be Near the Objective.
3:50:02 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
3:50:04 [DZMS]: Running Minor Mission SM7.
3:50:15 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 3 units in mission.
3:50:16 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 6 units in mission.
3:50:17 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 9 units in mission.
3:50:19 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 12 units in mission.
3:50:20 [DZMS]: (DZMSUnitsMinor) Waiting for 12/12 Units or Less to be Alive and a Player to be Near the Objective.
---------------------------------------------------------------------------------------------------------------------------------------------
No errors. Your extra lines must have introduced that error somehow. it is odd how making that units command into an array removed the error.

So I tested the code placing [units _unitgroup] instead of the ( ) as you did, and this is what resulted
Code:
4:00:02 [DZMS]: (DZMSUnitsMajor) Waiting for 4/4 Units or Less to be Alive and a Player to be Near the Objective.
4:00:03 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 1 units in mission.
4:00:03 Error in expression <ve <= 30} count playableUnits > 0) && ({alive _x} count DZMSUnitsMajor <= (_numS>
4:00:03   Error position: <alive _x} count DZMSUnitsMajor <= (_numS>
4:00:03   Error alive: Type Array, expected Object
4:00:04 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 2 units in mission.
4:00:05 [DZMS]: (DZMSUnitsMinor) 3 AI Spawned, 3 units in mission.
---------------------------------------------------------------------------------------------------------------------------------------
Now it has an error saying that I gave it a type of array but was expecting an object. Instead of adding an object of the type to the array, it added an array. ....


So no idea why, but yours works now, where it breaks the default script.
 
Nothing I did changed any of that. I added a few variables to vehicles so some alarms would show up.
 
So, I yield.

The error is still There. I tried everything and couldn't trap the source.

So, I'm taking your advice and starting over on it with a fresh download. Fingers crossed.
 
That didn't fix it. Its doing it on a fresh install.

Dang it.


8:32:49 No speaker given for Hans Wagner
8:32:49 No speaker given for Thomas Weber
8:32:49 Error in expression <ZMSUnitsMajor = DZMSUnitsMajor + (units _unitGroup);
_unitMissionCount = count >
8:32:49 Error position: <_unitGroup);
_unitMissionCount = count >
8:32:49 Error Missing )
8:32:49 Error in expression <ZMSUnitsMajor = DZMSUnitsMajor + (units _unitGroup);
_unitMissionCount = count >
8:32:49 Error position: <_unitGroup);
_unitMissionCount = count >
8:32:49 Error Missing )
8:32:49 [DZMS]: (DZMSUnitsMajor) 4 AI Spawned, any units in mission.
8:32:49 Error in expression <s in mission.",count (units _unitGroup),_unitMissionCount,_unitArrayName];
>
8:32:49 Error position: <_unitMissionCount,_unitArrayName];
>
8:32:49 Error Undefined variable in expression: _unitmissioncount
8:32:49 File z\addons\dayz_server\DZMS\Scripts\DZMSAISpawn.sqf, line 146
 
Last edited:
It has to be something to do with other mods where i'm adding AI. I'm not sharing variables, so I don't understand why though.
 
Three possibilities here:

(1) DZMSUnitsMajor or DZMSUnitsMinor (do you get the errors for DZMSunitsMinor?) are null and therefore count returns null and then you get the errors. Those are global variables so you could be altering them from outside this script. Check and see if they are changed somewhere. If you have installed DZMS completely fresh from the github, then this probably isn't happening.

(2) You have introduced that error somewhere because I don't have it (probably nobody else has it since that file is running on thousands of servers for 6 months and nobody has reported that error). What I have seen you post several times now is "I did a workaround" or something like that. So your server is getting a bunch of 'quick fixes' , such as your addaction problem, and its finally catching up with you. I would like to say Dayz is 'delicate', but the more apt term is 'ready to fall apart at the slightest touch'.

(3) Now looking at that bit of code, I would think you should have fixed the code with a fresh install. So its possible that the actual Arma2 codebase has been corrupted. The issue you are having could be from the count %1 function ..
I have had an Arma2 folder inside of a pbo that suddenly, and mysteriously, lost files it needed. So its possible your count function is corrupted or something other low level pbo. In steam, validate your files.
 
Last edited:
Good points.

Both minor and major have the problem.

I did a search and I'm not touching them anywhere.

2 - yep, it has to be me. However, I don't think anything I did should have caused it. I just tried with a fresh copy and none of my stuff and it still happeend.

3- this might be it. trying that now.
 
Ok did some more testing. This is interesting.

If I take the function out of the compile format and just put it in terms of ifs based upon the two types of missions, there is no error.

Same exact function.
 
That was a a waste of time.

If I go back before my previous project everything is fine. I must have introduced something.

At least its narrowed down now
 
I've searched the new project for any variable conflicts.

then I went ahead and put a unique identifyer added to each variable just in case. Checked that everything that could be private was.

And yet, it still persists.

The only link is that both are creating AI.
 
and you verified the files for arma2 and arma2oa in the steam library right?

If all else fails, you have two options:

(1) start from scratch or your last valid backup.
(2) ignore the error. The missions spawn, maybe the units wont get deleted if there is a mission timer (I dont know if there is or not, I dont use missions) but if the players kill the units it wont matter.

If you ignore the error you might just get in deeper since there is something subtle and nefarious going on in some other file I think. It may eventually affect some other scripts also.
 
yeh, i'm not game to delete. I guess what i'll do is start the script up peice by peice and see which step is the cause.

If it turn it of, everything is fine. What a pain.

Thanks for all the ongoing help.
 
Back
Top