Page MenuHomeFeedback Tracker

Unable to setCurrentChannel 15
Acknowledged, NormalPublic

Description

Ten custom radio channels can be created, but the 10th one cannot be selected via setCurrentChannel. By cycling via nextChannel and prevChannel I can see that the channel is present and usable by my player, but setCurrentChannel will not select it.

Details

Severity
None
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
Scripting
Steps To Reproduce

Run the following code from the debug window during a vanilla mission.

for "_i" from 1 to 10 do
{
	radioChannelCreate [[1.0, 1.0, 1.0, 1.0], format ["Channel %1", _i], "", []];
};

for "_i" from 1 to 10 do
{
    setCurrentChannel 3;

    _i radioChannelAdd [player];
    setCurrentChannel (_i + 5);
    systemchat str currentChannel;

    if (_i != 10) then { _i radioChannelRemove [player] };
};

The chat window will show

6
7
8
9
10
11
12
13
14
3

Indicating that ARMA will allow a script to select custom channels 1 through 9 (reported as 6 through 14) but not 10. The 3 on the end indicates that selecting channel 15 by script failed.

If you then manually cycle through the available channels after the script finishes, you'll find that your player has access to Channel 10. The channel is there and accessible, but setCurrentChannel will not work with it.

Event Timeline

JB47394 created this task.Apr 24 2018, 11:19 PM
JB47394 edited Steps To Reproduce. (Show Details)
Wulf changed the task status from New to Acknowledged.Apr 25 2018, 4:41 PM
Wulf added a subscriber: Wulf.

Hello.

Thank you for the report, we will have a look at it.