Page MenuHomeFeedback Tracker

BIS_fnc_compatibleMagazines Changing Parsed Variable _muzzle
New, NormalPublic

Description

When using BIS_fnc_compatibleMagazines with the local variable _muzzle, _muzzle is being changed from a muzzle (string) to a config entry:

systemChat str ["CHECK 1",_muzzle];    //["CHECK 1","LMG_coax"] 
_compatMags = [_muzzle] call BIS_fnc_compatibleMagazines;
systemChat str ["CHECK 2",_muzzle];    //["CHECK 2",bin\config.bin/CfgWeapons/LMG_coax]

This doesn't do it with a differently named variable, such as _muz.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce
  1. Place a player unit in the editor and run the mission.
  2. From debug console (or anywhere) run:
_muzzle = currentWeapon player;
systemChat str ["CHECK 1",_muzzle]; 
_compatMags = [_muzzle] call BIS_fnc_compatibleMagazines;
systemChat str ["CHECK 2",_muzzle];
Additional Information

Event Timeline

beno_83au created this task.Aug 6 2021, 4:09 AM
beno_83au renamed this task from BIS_fnc_compatibleMagazines Changing Parsed Variable to BIS_fnc_compatibleMagazines Changing Parsed Variable _muzzle.Aug 6 2021, 4:54 AM
beno_83au updated the task description. (Show Details)

Sorry, further testing showed that the variable _muzzle was the problem, and simply using a different variable negates the issue.

beno_83au edited Additional Information. (Show Details)Aug 6 2021, 7:47 AM