Arma 3 Version: 1.80 (stable)
CBA Version: 3.6.1 (stable)
ACE3 Version: 3.12.1 (stable)
Mods:
- CBA_A3
- ace
Description:
With ace_rearm_supply = 2 and adding function ace_rearm_fnc_addVehicleMagazinesToSupply to supply vehicle popups script error in line 6:
Error allTurrets: Type String, expected Array, Object
Steps to reproduce:
Where did the issue occur?
RPT log file:
ACE Debug: https://pastebin.com/9ssgpTw1
RPT: https://drive.google.com/open?id=1d0Ful53nQLvrCyW3Shn5iw4GSU00TR5c
Needs RPT file.
https://github.com/acemod/ACE3/blob/0644ad9ca2fadd28711dd614be296542a834bc3e/addons/rearm/functions/fnc_getAllRearmTurrets.sqf
Called with a string. params should probably verify.
https://github.com/acemod/ACE3/blob/0644ad9ca2fadd28711dd614be296542a834bc3e/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf#L28 makes sure a string is passed. But we only accept object.
There is no allTurrets syntax that takes a classname.
#
Caused by: #5411
https://github.com/acemod/ACE3/pull/5411/files#diff-1e207afbf4490e7eaed71d2ae790c4ffR32
Added RPT but it is 7MB of spam.
[ACE] (ui) INFO: Attempted modification of a forced User Interface element 'ammocount' by 'ace_reload'.
Spam indeed. WTF happened to your Arma :D
But the RPT doesn't help much anyway. Already found the error.
Weird mission? What happens on an empty mission.
Can you explain your post in more detail, dedmen?
What more detail? addVehicleMagazinesToSupply forces _vehicle variable to contain the classname.
and calls getAllRearmTurrets with that classname. But getAllRearmTurrets only accepts object as parameter.
Simple case of passing the wrong parameter type.
addVehicleMagazinesToSupply
https://github.com/acemod/ACE3/blob/0644ad9ca2fadd28711dd614be296542a834bc3e/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf#L7
We just cannot accept string here. And remove the
https://github.com/acemod/ACE3/blob/0644ad9ca2fadd28711dd614be296542a834bc3e/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf#L28-L31
I wonder what causing so much spam in RPT and such low FPS in what looks like a simple script error.
The error is not what's causing your RPT spam.
But it is. At least i got it every time, i am doing repro written above.
Because the function is running in the EGVAR(common,runAtSettingsInitialized) pushBack array, when the error happens it breaks the entire loop and keeps re-running the init chain each time.
Can reproduce by just doing
```
["CBA_settingsInitialized", {diag_log "here"; allTurrets "x"}] call cba_fnc_addEventHandler;
````
and it will spam forever. Code that goes into execNextFrame needs to be error free.