michail-nikolaev / task-force-arma-3-radio

TeamSpeak integration for Arma 3
http://radio.task-force.ru/en/
Other
313 stars 169 forks source link

Radio frequency reseting automatically #1235

Open Reekoj opened 7 years ago

Reekoj commented 7 years ago

Last A3 version 64bit Last TFR plugin 64bit Dedicated server

When a player buy a short range radio, I set a default frequency on all channels. Like this : if(_item in ["tf_anprc148jem","tf_anprc152"]) then { waitUntil {_hasSW = call TFAR_fnc_haveSWRadio; _hasSW}; for "_i" from 1 to 8 do { [(call TFAR_fnc_activeSwRadio), _i, "30.1"] call TFAR_fnc_SetChannelFrequency; }; }; So the frequency is 30.1

After that, they change their frequency to whatever they want, and randomly (10/30/50 minutes later), their frequency go back to 30.1 automatically. It's difficult to reproduce because as far as we know, it happens for some players, and it doesn't for others.

dedmen commented 7 years ago

Last A3 version 64bit Last TFR plugin 64bit No. No. What versions? and CBA? Sounds like an issue with a script of yours. How would I know what is causing it?

ElDoktor1911 commented 7 years ago

Our team facing a similar issue with last CBA 3.3.1 update. Our frequency are normally set when mission start. When players enter game, frequency use to be set in group variable and preset on each radio by the way. Since CBA 3.3.1, parameters are never set on group variable. => Downgrade to CBA 3.2.1 solve it. Here the init code running on server side :

if!(isServer || isDedicated)exitWith{};

private ["_settingsSwWest","_settingsLRWest"];

tf_same_sw_frequencies_for_side = true;
publicVariable "tf_same_sw_frequencies_for_side";

tf_same_lr_frequencies_for_side = true;
publicVariable "tf_same_lr_frequencies_for_side";

_settingsSwWest = false call TFAR_fnc_generateSwSettings;
_settingsSwWest set [2, ["61","62","63","64","65","66","67","68","69"]];
tf_freq_west = _settingsSwWest;
tf_freq_east = _settingsSwWest;
tf_freq_guer = _settingsSwWest;
publicVariable "tf_freq_west";
publicVariable "tf_freq_east";
publicVariable "tf_freq_guer";

_settingsLRWest = false call TFAR_fnc_generateLRSettings;
_settingsLRWest set [2, ["61","62","63","64","65","66","67","68","69"]];
tf_freq_west_lr = _settingsLRWest;
tf_freq_east_lr = _settingsLRWest;
tf_freq_guer_lr = _settingsLRWest;
publicVariable "tf_freq_west_lr";
publicVariable "tf_freq_east_lr";
publicVariable "tf_freq_guer_lr";
dedmen commented 7 years ago

@ElDoktor1911 CBA settings have changed. You have to re-set your settings. tf_same_sw_frequencies_for_side and tf_same_lr_frequencies_for_side script variables don't work anymore since 0.9.12. You have to set them in CBA Settings. And 3.3.1 was a almost complete rewrite of the settings system.

ElDoktor1911 commented 7 years ago

Many thanks Dedmen !