OleGatoR79
Member-
Content Count
2 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout OleGatoR79
-
Rank
Newbie
-
OleGatoR79 started following Broken magazinesAmmoFull on linux server. and Broken magazinesAmmoFull on linux server.
-
Broken magazinesAmmoFull on linux server.
OleGatoR79 posted a topic in ARMA 3 - SERVERS & ADMINISTRATION
After some last updates function magazinesAmmoFull was broken on linux 32bit server. It affected on Exile Mod for example in ExileClient_util_inventory_getLoadedMagazinesMap function. magazinesAmmoFull always returned empty array. (magazinesAmmoFull _player; or new syntax - magazinesAmmoFull [_player, true] too.) It causes problem "Error Zero divisor" I modified ExileClient_util_inventory_getLoadedMagazinesMap.sqf to load custom code to debug the issue. ______________________________________________________________________________________________________ private["_player", "_loadedMagazines", "_magazine", "_bullets", "_isLoaded", "_type", "_muzzle"]; _player = _this; diag_log _player; diag_log magazinesAmmoFull [_player, true]; diag_log _player; diag_log magazinesAmmo [_player, true]; _loadedMagazines = []; { _magazine = _x select 0; _bullets = _x select 1; _isLoaded = _x select 2; _type = _x select 3; _muzzle = _x select 4; if (_isLoaded) then { if (_bullets > 0) then { switch (_type) do { case 1: { _loadedMagazines pushBack [primaryWeapon _player, _magazine, _bullets, _muzzle]; }; case 2: { _loadedMagazines pushBack [handgunWeapon _player, _magazine, _bullets, _muzzle]; }; case 4: { _loadedMagazines pushBack [secondaryWeapon _player, _magazine, _bullets, _muzzle]; }; }; }; }; } forEach (magazinesAmmoFull _player); _loadedMagazines _____________________________________________________________________________________________________________________ As you can see below, diag_log magazinesAmmoFull [_player, true]; return an empty array "17:19:32 [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]" But magazinesAmmo (just for testing) return normal array. debug log: ________________________________ 17:19:32 R Alpha 1-2:1 17:19:32 [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] 17:19:32 R Alpha 1-2:1 17:19:32 [["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_DuctTape",1],["Exile_Item_DuctTape",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_EMRE",1],["Exile_Item_EMRE",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_DuctTape",1],["Exile_Item_Codelock",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_Defibrillator",1],["Exile_Item_ConcreteFloorKit",1],["Exile_Item_InstaDoc",1]] 17:19:32 Error in expression < _magazine = _x select 0; _bullets = _x select 1; _isLoaded = _x select 2; _type> 17:19:32 Error position: <select 1; _isLoaded = _x select 2; _type> 17:19:32 Error Zero divisor 17:19:32 File mpmissions\__cur_mp.Tanoa\Custom\ExileClient_util_inventory_getLoadedMagazinesMap.sqf..., line 24 -
Broken magazinesAmmoFull on linux server.
OleGatoR79 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
After some last updates function magazinesAmmoFull was broken on linux server. It affected on Exile Mod for example in ExileClient_util_inventory_getLoadedMagazinesMap function. magazinesAmmoFull always returned empty array. (magazinesAmmoFull _player; or new syntax - magazinesAmmoFull [_player, true] too.) It causes problem "Error Zero divisor" I modified ExileClient_util_inventory_getLoadedMagazinesMap.sqf to load custom code to debug the issue. ______________________________________________________________________________________________________ private["_player", "_loadedMagazines", "_magazine", "_bullets", "_isLoaded", "_type", "_muzzle"]; _player = _this; diag_log _player; diag_log magazinesAmmoFull [_player, true]; diag_log _player; diag_log magazinesAmmo [_player, true]; _loadedMagazines = []; { _magazine = _x select 0; _bullets = _x select 1; _isLoaded = _x select 2; _type = _x select 3; _muzzle = _x select 4; if (_isLoaded) then { if (_bullets > 0) then { switch (_type) do { case 1: { _loadedMagazines pushBack [primaryWeapon _player, _magazine, _bullets, _muzzle]; }; case 2: { _loadedMagazines pushBack [handgunWeapon _player, _magazine, _bullets, _muzzle]; }; case 4: { _loadedMagazines pushBack [secondaryWeapon _player, _magazine, _bullets, _muzzle]; }; }; }; }; } forEach (magazinesAmmoFull _player); _loadedMagazines _____________________________________________________________________________________________________________________ As you can see, diag_log magazinesAmmoFull [_player, true]; return an empty array "17:19:32 [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]]" But magazinesAmmo (just for testing) return normal array. debug log: ________________________________ 17:19:32 R Alpha 1-2:1 17:19:32 [[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]] 17:19:32 R Alpha 1-2:1 17:19:32 [["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_DuctTape",1],["Exile_Item_DuctTape",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_EMRE",1],["Exile_Item_EMRE",1],["Exile_Item_PlasticBottleFreshWater",1],["Exile_Item_DuctTape",1],["Exile_Item_Codelock",1],["Exile_Item_InstaDoc",1],["Exile_Item_InstaDoc",1],["Exile_Item_Defibrillator",1],["Exile_Item_ConcreteFloorKit",1],["Exile_Item_InstaDoc",1]] 17:19:32 Error in expression < _magazine = _x select 0; _bullets = _x select 1; _isLoaded = _x select 2; _type> 17:19:32 Error position: <select 1; _isLoaded = _x select 2; _type> 17:19:32 Error Zero divisor 17:19:32 File mpmissions\__cur_mp.Tanoa\Custom\ExileClient_util_inventory_getLoadedMagazinesMap.sqf..., line 24