diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 9a3eb315983..463c4d4855b 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -28,7 +28,8 @@ private _player = ACE_player; if ((_origActionData select 10) isNotEqualTo {}) then { // It should, so make a copy and pass it to the modifierFunction _origActionData = +_origActionData; - [_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10); + private _actionParams = _origActionData select 6; // Define _actionParams so its accessible within the statement/condition + [_target, ACE_player, _actionParams, _origActionData] call (_origActionData select 10); }; _origActionData params [ diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index a12a404da73..00f4f4903e8 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -42,9 +42,10 @@ if (GVAR(actionSelected)) then { private _savedThis = this; this = GVAR(selectedTarget); - if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { + private _actionParams = _actionData select 6; // Define _actionParams so its accessible within the statement/condition + if ([_target, _player, _actionParams] call (_actionData select 4)) then { // Call the statement - [_target, _player, _actionData select 6] call (_actionData select 3); + [_target, _player, _actionParams] call (_actionData select 3); // Clear the conditions caches again if the action was performed [QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 2089f6b1060..fca3522f33d 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -103,9 +103,10 @@ if (GVAR(openedMenuType) >= 0) then { // Check the action conditions private _actionData = GVAR(selectedAction) select 0; - if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { + private _actionParams = _actionData select 6; // Define _actionParams so its accessible within the statement/condition + if ([_target, _player, _actionParams] call (_actionData select 4)) then { // Call the statement - [_target, _player, _actionData select 6] call (_actionData select 3); + [_target, _player, _actionParams] call (_actionData select 3); // Clear the conditions caches again if the action was performed [QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent;