Page MenuHomeFeedback Tracker

High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. IT IS ARMA 3 CORE. it is not CBA like I previously updated. Tested with NO MODS)
New, NormalPublic

Description

//*update - IT IS ARMA 3 CORE. it is not CBA like I previously updated. I updated this yesterday to say the problem was CBA, but actually I was incorrect. Same error without any mods at all. It is Arma 3 core bug.

If you use this code:

[] spawn {
waitUntil {!isNil "BIS_marta_mainscope"};
player setVariable [ "MARTA_hide", allGroups select {side _x != playerSide}];
};

you get an error when enemy group is detected. Listed below.

18:35:13 Error in expression <N_TYPE";
_icon = (_element getgroupicon _iconID) select 0;
_iconname = _groupico>
18:35:13   Error position: <_iconID) select 0;
_iconname = _groupico>
18:35:13   Error Undefined variable in expression: _iconid
18:35:13 File A3\modules_f\hc\data\scripts\hc_local.sqf..., line 106
18:35:13  ➥ Context: 	[] L80 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[loop] L93 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[] L100 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[] L102 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[] L108 (A3\modules_f\hc\data\scripts\hc_local.sqf)

18:35:13 Error in expression <_start} else {0};
		_array = _array + [[_itemName, [_itemShortcut], format [_sub>
18:35:13   Error position: <_itemName, [_itemShortcut], format [_sub>
18:35:13   Error Undefined variable in expression: _itemname
18:35:13 File \A3\Functions_F\Misc\fn_createmenu.sqf..., line 68
18:35:13  ➥ Context: 	[] L80 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[loop] L93 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[] L129 (A3\modules_f\hc\data\scripts\hc_local.sqf)
	[main] L53 (\A3\Functions_F\Misc\fn_createmenu.sqf)
	[] L59 (\A3\Functions_F\Misc\fn_createmenu.sqf)
	[] L68 (\A3\Functions_F\Misc\fn_createmenu.sqf)

the only way to prevent the error is use this beforehand:

player setVariable [ "MARTA_reveal", allGroups select {side _x != playerSide}]; 
sleep 1;

However that is nonesensical, then you seen the enemy group icons for a moment amd it defeats the purpose- there is a fade animation and gives away all their positions, before the "MARTA_HIDE" kicks in.
even if you have the commands right next to each other without sleep, you still get the error.

player setVariable [ "MARTA_reveal", allGroups select {side _x != playerSide}]; 
player setVariable [ "MARTA_hide", allGroups select {side _x != playerSide}];

equals error.

Looking at all BIS documentation and the code in the forums, seems like just using "MARTA_HIDE" on groups that have not been detected yet by your side should not throw an error.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 11 x64
Category
AI Control / Commanding
Steps To Reproduce

Eden Editor:

  1. setup high command.
  2. add blufor group
  3. add enemy groups a distance away so they wont get detected yet
  4. Play mission (MP or SP)
  5. in debug console, run this code:
[] spawn {
waitUntil {!isNil "BIS_marta_mainscope"};
player setVariable [ "MARTA_hide", allGroups select {side _x != playerSide}];
};
  1. Detect enemy (e.g. using binoculars and "T" key command)

you will get an error when enemy is detected.

Event Timeline

bendy303 created this task.Tue, Mar 25, 8:49 AM
bendy303 updated the task description. (Show Details)
bendy303 updated the task description. (Show Details)Tue, Mar 25, 8:51 AM
bendy303 updated the task description. (Show Details)Tue, Mar 25, 8:54 AM
bendy303 updated the task description. (Show Details)Tue, Mar 25, 8:57 AM
bendy303 updated the task description. (Show Details)
bendy303 updated the task description. (Show Details)Tue, Mar 25, 9:00 AM
bendy303 edited Steps To Reproduce. (Show Details)
bendy303 updated the task description. (Show Details)Tue, Mar 25, 9:08 AM
bendy303 updated the task description. (Show Details)
bendy303 updated the task description. (Show Details)Tue, Mar 25, 9:15 AM
bendy303 edited Steps To Reproduce. (Show Details)
bendy303 edited Steps To Reproduce. (Show Details)Tue, Mar 25, 9:24 AM
This comment was removed by Geez.
Geez added a subscriber: Geez.Tue, Mar 25, 9:40 AM
This comment was removed by bendy303.
bendy303 renamed this task from High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. to High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. CBA mod culprit.).Tue, Mar 25, 11:51 AM
bendy303 updated the task description. (Show Details)
bendy303 renamed this task from High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. CBA mod culprit.) to High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. CBA mod is culprit.).Tue, Mar 25, 12:01 PM
bendy303 renamed this task from High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. CBA mod is culprit.) to High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. NO IT IS ARMA 3 CORE. it is not CBA like I previously updated).Wed, Mar 26, 7:24 AM
bendy303 updated the task description. (Show Details)
bendy303 updated the task description. (Show Details)Wed, Mar 26, 7:29 AM
bendy303 renamed this task from High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. NO IT IS ARMA 3 CORE. it is not CBA like I previously updated) to High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. IT IS ARMA 3 CORE. it is not CBA like I previously updated).
bendy303 updated the task description. (Show Details)

mission file to test. The code is already in the init field (put in Eden editor)

start mission, go to left and use binoculars to view and target enemy squad. U will get an error.

bendy303 renamed this task from High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. IT IS ARMA 3 CORE. it is not CBA like I previously updated) to High Command (or MartaManager) if you try to hide groups preemptively with setVariable [ "MARTA_HIDE"] you get Error message. (*update. IT IS ARMA 3 CORE. it is not CBA like I previously updated. Tested with NO MODS).Wed, Mar 26, 10:58 AM
Geez removed a subscriber: Geez.Wed, Mar 26, 11:03 AM

happens without cba; some quick notes from testing

(bis_marta_mainscope getvariable "enemygroups") apply { _x getvariable "BIS_MARTA_ICON_TYPE" }

[<null>] // this is why we get a script error for undefined

checking diag_activeMissionFSMs # 1
["Marked Targets - Local","Init",-21.914]
it never leaves this stage in the FSM, so I suspect the error is here