FAForever / faf-coop-maps

Coop maps for FAF
8 stars 21 forks source link

Fix Aeon M4 bug with incorrect platoon reference #436

Closed maudlin27 closed 4 months ago

maudlin27 commented 7 months ago

Fixes a bug caused by a reference to a string instead of a platoon

Error message given prior to this change: WARNING: Error running lua script: ...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua(891): Expected a game object. (Did you call with '.' instead of ':'?) stack traceback: [C]: in function `PlatoonExists' ...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua(891): in function <...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua:880>

maudlin27 commented 7 months ago

Although this fixed the issue for the replay where it occured, running a fresh replay results in the error: WARNING: Error running lua script: ...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua(893): Game object has been destroyed stack traceback: [C]: in function `AssignUnitsToPlatoon' ...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua(893): in function <...alliance\maps\scca_coop_a04\scca_coop_a04_script.lua:880>

I'll look into some more to see if the new error can be mitigated.

maudlin27 commented 7 months ago

With thanks to relent0r, the second issue I encountered was where some of the transports in the platoon were dead - have updated the PR to fix this (by only transferring over living transports)