ALiVEOS / ALiVE.OS

ALiVE Open Source GPL v2
http://alivemod.com/
Other
160 stars 80 forks source link

Error when adding artillery post-init using ALiVE_fnc_combatSupportAdd #780

Closed romabysen closed 1 year ago

romabysen commented 1 year ago

Prerequisites

Description

When adding artillery to Player Combat Support post-init there is this error: Error Undefined variable in expression: _audio

[Description of the bug or feature] The _audio variable is not actually set in the "ARTY" case. Both "CAS" and "TRANSPORT" has the line private _audio = NEO_radioLogic getvariable ["combatsupport_audio",true]; but it is missing for the "ARTY" case.

Steps to Reproduce

  1. Set up a scenario with the Player Combat Support module
  2. Try to manually add artillery support after init
  3. The error about _audio being undefined will show.

Expected behavior: No error should be printed. Artillery uses audio.

Actual behavior: There is an error and there are no audio messages from the artillery. log.rpt.txt

romabysen commented 1 year ago

I should add that the error continues to occur when there is comms from the artillery so it's a bit annoying even though the artillery itself works fine.