From afedd19b68db86a1ef24be60fa5237583ab99eb3 Mon Sep 17 00:00:00 2001 From: vbawol Date: Mon, 3 Jun 2013 12:36:19 -0500 Subject: [PATCH] Fixed generic error in expression on safe code fix. --- dayz_server/system/server_monitor.sqf | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/dayz_server/system/server_monitor.sqf b/dayz_server/system/server_monitor.sqf index ceaa777df..33c29c641 100644 --- a/dayz_server/system/server_monitor.sqf +++ b/dayz_server/system/server_monitor.sqf @@ -97,20 +97,15 @@ serverVehicleCounter = []; // fix for leading zero issues on safe codes after restart if (_object isKindOf "VaultStorageLocked") then { - - if(_ownerID == 0) then { - _ownerID = "0000"; - } else { - _codeCount = (count (toArray _ownerID)); - if(_codeCount == 3) then { - _ownerID = format["0%1", _ownerID]; - }; - if(_codeCount == 2) then { - _ownerID = format["00%1", _ownerID]; - }; - if(_codeCount == 1) then { - _ownerID = format["000%1", _ownerID]; - }; + _codeCount = (count (toArray _ownerID)); + if(_codeCount == 3) then { + _ownerID = format["0%1", _ownerID]; + }; + if(_codeCount == 2) then { + _ownerID = format["00%1", _ownerID]; + }; + if(_codeCount == 1) then { + _ownerID = format["000%1", _ownerID]; }; };