From 8118d1de0ee465047daf39b4ed875a7b4e5282fe Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 15 Sep 2022 19:41:05 +0200 Subject: [PATCH 1/2] Update fnc_binocularMagazine.sqf --- addons/common/fnc_binocularMagazine.sqf | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/addons/common/fnc_binocularMagazine.sqf b/addons/common/fnc_binocularMagazine.sqf index deb3e35818..a9f77d2dbf 100644 --- a/addons/common/fnc_binocularMagazine.sqf +++ b/addons/common/fnc_binocularMagazine.sqf @@ -17,20 +17,10 @@ Examples: (end) Author: - commy2 + commy2, johnb43 ---------------------------------------------------------------------------- */ SCRIPT(binocularMagazine); params [["_unit", objNull, [objNull]]]; -private _binocular = binocular _unit; -private _magazine = ""; - -{ - if ((_x select 0) isEqualTo _binocular) exitWith { - // note: if there is no magazine, _x(4,0) will be nil - _magazine = (_x select 4) param [0, ""]; - }; -} forEach weaponsitems _unit; - -_magazine +binocularMagazine _unit From ec6aaa9aa67e50bf7b511a69a4c9c83b4dbc57e3 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Thu, 15 Sep 2022 20:03:55 +0200 Subject: [PATCH 2/2] Update fnc_binocularMagazine.sqf --- addons/common/fnc_binocularMagazine.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/common/fnc_binocularMagazine.sqf b/addons/common/fnc_binocularMagazine.sqf index a9f77d2dbf..97fcc8962f 100644 --- a/addons/common/fnc_binocularMagazine.sqf +++ b/addons/common/fnc_binocularMagazine.sqf @@ -23,4 +23,4 @@ SCRIPT(binocularMagazine); params [["_unit", objNull, [objNull]]]; -binocularMagazine _unit +(binocularMagazine _unit) param [0, ""]