Jump to content
  • 0

Error Undefined variable in expression: dze_replace_weapons


mintypie007

Question

So pretty much I have had this error for a long time. It spams the armarpt log with about 50 pages of this.

 

if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
_x>
 5:27:08   Error position: <DZE_REPLACE_WEAPONS select 0)) then {
_x>
 5:27:08   Error Undefined variable in expression: dze_replace_weapons
 5:27:08 File z\addons\dayz_server\system\server_monitor.sqf, line 200
 5:27:08 Error in expression <select 1;
_countr = 0;                    
{
if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
_x>
 5:27:08   Error position: <DZE_REPLACE_WEAPONS select 0)) then {
_x>
 5:27:08   Error Undefined variable in expression: dze_replace_weapons
 5:27:09 File z\addons\dayz_server\system\server_monitor.sqf, line 200
 5:27:09 Error in expression <select 1;
_countr = 0;                    
{

 

 

 

I have checked the expression there and it matches up with what I have seen from other posts and also the download for the files.

 

 

 

 

if (count _intentory > 0) then {
                if (_type in DZE_LockedStorage) then {
                    // Fill variables with loot
                    _object setVariable ["WeaponCargo", (_intentory select 0), true];
                    _object setVariable ["MagazineCargo", (_intentory select 1), true];
                    _object setVariable ["BackpackCargo", (_intentory select 2), true];
                } else {

                    //Add weapons
                    _objWpnTypes = (_intentory select 0) select 0;
                    _objWpnQty = (_intentory select 0) select 1;
                    _countr = 0;                    
                    {
                        if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
                            _x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
                        };
                        _isOK =     isClass(configFile >> "CfgWeapons" >> _x);
                        if (_isOK) then {
                            _block =     getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
                            if (!_block) then {
                                _object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
                            };
                        };
                        _countr = _countr + 1;
                    } forEach _objWpnTypes;

 

 

 

 

I have made edits to the server monitor sqf however never in this section.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
};
if(isNil "DZE_FriendlySaving") then {
DZE_FriendlySaving = true;
};
 
DZE_REPLACE_WEAPONS = [["Crossbow","ItemMatchbox","ItemHatchet"],["Crossbow_DZ","ItemMatchbox_DZE","ItemHatchet_DZE"]];
 
/*
if(isNil "dayz_canBuildInCity") then {
dayz_canBuildInCity = false;
};
*/
 
 
 
It does indeed. Still getting the error. It seems to only occur during server start so I assume it would not cause any lag so its a non issue I guess. Still with most recent patch as well. Obviously something else I have running is breaking it.
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...