DZAI error in log

Megaz

Member
Hi Buttface:
I did post in the other thread but it has been locked and I have no answer so hope its ok to make a new post.
I am getting this error and spams a lot: since updating from older version. I did a clean install of DZAI just copied my custom spawn points and marker over to the new files.

2:15:48 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:15:48 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:15:48 Error Undefined variable in expression: _loadout
2:15:48 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148

The file it is calling is stock from github: https://github.com/dayzai/DZAI
using 2.10 Arma 112555
Epoch 1.0.5.1
map Napf

Any help would be appreciated
MegaZ
 
Can you provide a larger log sample, with a few blocks of lines before and after the error message? It would help me figure out what's happening before and after the error and possibly show the cause of the error. I haven't seen this error once anywhere in my logs within 25000 lines so there isn't much I can do right now. What I do know is that the script file works in normal situations so I need to know what special situation is causing it to produce this error.
 
Hi thanks for the quick reply, see below.
Version 1.63.112555
2:07:47 "HIVE: Vehicle Spawn limit reached!"
2:07:47 "HIVE: Spawning # of Debris: 100"
2:07:47 "HIVE: Spawning # of Ammo Boxes: 5"
2:07:47 "HIVE: Spawning # of Veins: 7"
2:07:47 "Total Number of spawn locations 11"
2:07:47 "[DZAI] Initializing DZAI version 2.1.0 Release Build 7122014 using base path z\addons\dayz_server\DZAI."
2:07:47 "[DZAI] Reading DZAI configuration file."
2:07:47 "[DZAI] DZAI configuration file loaded."
2:07:47 "[DZAI] Compiling DZAI functions."
2:07:47 "[DZAI] DZAI functions compiled."
2:07:47 "[DZAI] Epoch classnames loaded."
2:07:47 "[DZAI] DZAI settings: Debug Level: 0. DebugMarkers: false. WorldName: napf. ModName: epoch. DZAI_dynamicWeaponList: true. VerifyTables: true."
2:07:47 "[DZAI] AI spawn settings: Static: true. Dynamic: false. Air: true. Land: true."
2:07:47 "[DZAI] AI settings: DZAI_findKiller: true. DZAI_useHealthSystem: true. DZAI_weaponNoise: false. DZAI_zombieEnemy: false."
2:07:47 "[DZAI] DZAI loading completed in 0.34201 seconds."
2:08:08 "EPOCH EVENTS INIT"
2:08:08 "WAI: AI Config File Loaded"
2:08:09 "WAI: AI Monitor Started"
2:08:09 "TIME SYNC: Local Time set to [2013,8,3,6,8]"
2:08:10 "WAI: Spawned a group of 5 Bandits at [16563.9,18256.5,0.001]"
2:08:11 "infiSTAR.de PlayerConnected: _uid: _name: __SERVER__"
2:08:18 "WAI: Mission Config File Loaded"
2:08:21 "WAI: Starting AI Missions Moniter"
2:08:31 "infiSTAR.de Log: DRAGONES ogima(xxxxx246) - Left SafeZone @129104"
2:08:42 "WAI: Spawned a group of 10 Bandits at [17203.9,18562.6,0.001]"
2:08:43 "[DZAI] Verified 194 unique classnames in 26.521 seconds."
2:08:43 "Napf spawn areas loaded."
2:08:45 "WAI: Spawned a group of 5 Bandits at [16338.1,18299,0.001]"
2:08:45 "Napf static spawn configuration loaded."
2:08:47 "WAI: Spawned a group of 5 Bandits at [16202.2,18590.8,0.001]"
2:08:49 "WAI: Spawned a group of 5 Bandits at [16040.5,18808.9,0.001]"
2:08:51 "WAI: Sapwned in 6 M2StaticMG"
2:08:51 "WAI: Paradrop Waiting for player"
2:08:51 "WAI: Paradrop Waiting for player"
2:09:13 "infiSTAR.de PlayerConnected: _uid: xxxxx190 _name: MegaZ"
2:09:13 "infiSTAR.de - Player-Log: MegaZ(xxxxx190) - 0h 00min | ******ADMIN******"
2:09:34 Warning: z\addons\dayz_communityassets\models\razor.p3d:0 Error while trying to generate ST for points: 214, 349, 208
2:09:35 "infiSTAR.de PVAH_AdminReqLog: [1234,B 1-1-C:1 (MegaZ) REMOTE,"xxxx190"]"
2:09:35 "infiSTAR.de ******ADMIN-LOGIN******: MegaZ(xxxxx3190)"
2:09:36 "infiSTAR.de Log: MegaZ(xxxx3190) - Left SafeZone @029142"
2:09:41 [DZMS]: Starting DayZ Mission System.
2:09:41 [DZMS]: DZAI Found! Using DZAI's Relations!
2:09:41 [DZMS]: WickedAI Found! Using WickedAI's Relations!
2:09:41 [DZMS]: Multiple Relations Detected! Unwanted AI Behaviour May Occur!
2:09:41 [DZMS]: If Issues Arise, Decide on a Single AI System! (DayZAI, SargeAI, or WickedAI)
2:09:41 [DZMS]: Currently Running Version: 1.1FIN
2:09:41 [DZMS]: Mission and Extended Configuration Loaded!
2:09:41 [DZMS]: napf Detected. Map Specific Settings Adjusted!
2:09:41 [DZMS]: DayZ Epoch Detected! Some Scripts Adjusted!
2:09:41 [DZMS]: Loading ExecVM Functions.
2:09:41 [DZMS]: Loading Compiled Functions.
2:09:41 [DZMS]: Loading All Other Functions.
2:09:41 [DZMS]: Mission Functions Script Loaded!
2:09:41 [DZMS]: Major Mission Clock Starting!
2:09:41 [DZMS]: Minor Mission Clock Starting!
2:09:41 [DZMS]: Mission Marker Loop for JIPs Starting!
2:11:02 "30 Active ground units"
2:11:02 "6 Active emplacement units"
2:11:02 "6 Active chopper patrol units (Crew)"
2:11:02 "0 Active vehicle patrol units (Crew)"
2:12:08 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ GroupIcons Activated"]"
2:12:10 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ G_o_d ON"]"
2:12:59 "infiSTAR.de PVAH_AdminReqLog: [1,B 1-1-C:1 (MegaZ) REMOTE,[1586.14,8883.41,0]]"
2:12:59 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Teleport to [1586.14,8883.41,0](@015115)"]"
2:13:31 "CLEANUP: INITIALIZING CLEANUP SCRIPT"
2:13:36 "infiSTAR.de PVAH_AdminReqLog: [1,B 1-1-C:1 (MegaZ) REMOTE,[4644.43,16669.3,0]]"
2:13:36 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Teleport to [4644.43,16669.3,0](@046038)"]"
2:15:01 "RUNNING EVENT: FMission_Launcher3 on [2014,7,18,6,15]"
2:15:03 "FMission Launcher 3: Checking Spawn Chance"
2:15:03 "FMission Launcher 3: Spawn Chance Failed with 0.966594 it needed to be lower than 0.8"
2:15:38 "DEBUG :: O 1-2-E:1 was killed by O 1-2-G:3 from 4.22048m. Cause: bled."
2:15:40 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:15:40 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:15:40 Error Undefined variable in expression: _loadout
2:15:40 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:15:46 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:15:46 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:15:46 Error Undefined variable in expression: _loadout
2:15:46 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:15:48 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:15:48 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:15:48 Error Undefined variable in expression: _loadout
2:15:48 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:15:52 "infiSTAR.de PVAH_AdminReqLog: [1,B 1-1-C:1 (MegaZ) REMOTE,[1509.97,8900.94,0]]"
2:15:52 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Teleport to [1509.97,8900.94,0](@015115)"]"
2:15:57 "infiSTAR.de PlayerConnected: _uid: xxxxx2598 _name: dragones roldanus"
2:15:57 "infiSTAR.de - Player-Log: dragones roldanus(xxxxx2598) - 0h 10min"
2:16:53 "infiSTAR.de Log: dragones roldanus(xxxxx2598) - Left SafeZone @124152"
2:17:12 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Spectating dragones roldanus"]"
2:17:15 "infiSTAR.de Log: dragones roldanus(xxxxxx598) - Entered SafeZone @124153"
2:17:23 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Spectating dragones roldanus"]"
2:17:37 "get: STRING (xxxxx6246), sent: STRING (xxxxx6246)"
2:17:37 "DISCONNECT: DRAGONES ogima (xxxxx6246) Object: B 1-1-B:1 (DRAGONES ogima) REMOTE, _characterID: 4551 at loc [13453.8,8760.47,0.0018158]"
2:17:37 Client: Remote object 3:7 not found
2:17:40 Warning: Cleanup player - person 3:6 not found
2:18:05 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:18:05 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:18:05 Error Undefined variable in expression: _loadout
2:18:05 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:18:06 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:18:06 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:18:06 Error Undefined variable in expression: _loadout
2:18:06 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:18:06 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
2:18:06 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
2:18:06 Error Undefined variable in expression: _loadout
2:18:06 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
2:18:32 "infiSTAR.de PVAH_AdminReqLog: [4,B 1-1-C:1 (MegaZ) REMOTE,B 1-1-C:1 (MegaZ) REMOTE]"
2:18:32 "infiSTAR.de PVAH_WriteLog: [B 1-1-C:1 (MegaZ) REMOTE,"MegaZ Adminkilled MegaZ"]"

MegaZ
 
Thanks for the log sample. Can I please bother you again for another log sample with debug level 2 enabled, showing everything from DZAI starting up to a few lines after the first appearance of the error? Thank you. It seems this problem will need very detailed debug output to help getting fixed.

If anyone else has experienced this error, your input would be very appreciated. Im unable to replicate this error so I don't have anything to go on.
 
Hi Buttface, Tried the files but error is still there also i now have a new error see below:

7:53:43 Error in expression <er",DZAI_nullScript]);

if !(scriptDone _groupManager) then {
terminate _groupMa>
7:53:43 Error position: <_groupManager) then {
terminate _groupMa>
7:53:43 Error Undefined variable in expression: _groupmanager
7:53:43 File z\addons\dayz_server\DZAI\init\dzai_functions.sqf, line 357


This is the line
_groupManager = (_this getVariable ["GroupManager",DZAI_nullScript]);

if !(scriptDone _groupManager) then {
terminate _groupManager;
//diag_log ("DEBUG :: Success - DZAI_deleteGroup is terminating group manager and deleting group : " + str(_this));
};

MegaZ
 
I made many new updates during the past few days, make sure you're running the very newest one (
2.1.0.1c Release Build 7212014).
 
Hi Buttface just downloaded latest version: Still get the original error.
error 357 seems to have gone but got another :

12:53:35 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
12:53:35 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
12:53:35 Error Undefined variable in expression: _loadout
12:53:35 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148


13:19:41 Error in expression < [count _loot,_miscItemS];};
};
};

if (_weapongrade > 0) then {

if ((getNumber>
13:19:41 Error position: <_weapongrade > 0) then {

if ((getNumber>
13:19:41 Error Undefined variable in expression: _weapongrade
13:19:41 File z\addons\dayz_server\DZAI\compile\ai_generate_loot.sqf, line 57


I far as I can see it still works ok.
MegaZ
 
Last edited:
I've narrowed down the cause to cases where AI groups are deleted immediately after all units are killed. I'm working on another update to let DZAI wait a while for all after-death scripts to finish executing before finally deleting the group. This should solve all the error messages. There should be no real observable in-game consequences as a result of these errors, but it's best to fix them anyways.
 
Updated to 2.1.0.1d. There's now a short time window of 30 seconds before groups are deleted if loot needs to be added, should prevent some of the undefined variable errors. The group_manager.sqf errors shouldn't show up anymore since the DZAI group-deleting function terminates the script before it deletes the group, but we will see what happens.
 
I'm running the latest version and I'm getting this sporadically. I run 4 static foot patrol locations, 2 land vehicle patrols and 3 heli patrols.
Code:
 3:15:14 Error in expression < _unit getVariable "bandageAmount";
if (_bandages > 0) then {
_health = _unit ge>
3:15:14   Error position: <_bandages > 0) then {
_health = _unit ge>
3:15:14   Error Undefined variable in expression: _bandages
3:15:14 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 157
3:15:29 Error in expression < _unit getVariable "bandageAmount";
if (_bandages > 0) then {
_health = _unit ge>
3:15:29   Error position: <_bandages > 0) then {
_health = _unit ge>
3:15:29   Error Undefined variable in expression: _bandages
3:15:29 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 157
3:15:29 Error in expression < _unit getVariable "bandageAmount";
if (_bandages > 0) then {
_health = _unit ge>
3:15:29   Error position: <_bandages > 0) then {
_health = _unit ge>
3:15:29   Error Undefined variable in expression: _bandages
3:15:29 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 157
3:15:30 Error in expression < _unit getVariable "bandageAmount";
if (_bandages > 0) then {
_health = _unit ge>
3:15:30   Error position: <_bandages > 0) then {
_health = _unit ge>
3:15:30   Error Undefined variable in expression: _bandages
3:15:30 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 157
Spams the log a hell of a lot and then disappears.
 
I'm having something similar:

Code:
 0:20:13 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
 0:20:13   Error position: <_loadout select 0)) - 1) do {
if (((_uni>
 0:20:13   Error Undefined variable in expression: _loadout
 0:20:13 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148
 
Last edited:
I am also now getting this error back (not as much but it does show up)
12:21:43 Error in expression <nes _unit);
for "_i" from 0 to ((count (_loadout select 0)) - 1) do {
if (((_uni>
12:21:43 Error position: <_loadout select 0)) - 1) do {
if (((_uni>
12:21:43 Error Undefined variable in expression: _loadout
12:21:43 File z\addons\dayz_server\DZAI\compile\group_manager.sqf, line 148


MegaZ
 
I believe I have found the root cause of the issue and will be bundling the fix along with the "wandering AI from vehicle patrols" fix. I'm pretty busy with other real life issues right now so the earliest ETA is about 2-3 weeks from this post. Since this is a non-critical bug (ignorable but annoying) I will spend more time testing code rather than releasing a hotfix.
 
Back
Top