Community-A-4E / community-a4e-c

The Community Repo for A-4E-C and its Official Submods
600 stars 86 forks source link

Error log of bad argument returns multiple times #633

Closed nadav-yo closed 11 months ago

nadav-yo commented 12 months ago

Describe the bug In the DCS logs, a

2023-12-02 20:37:29.598 ERROR   COCKPITBASE (Main): RWR::update:[string "path_to\Saved Games\DCS.openbeta\Mods/aircraft/A-4E-C/Cockpit/Scripts/Systems/rwr.lua"]:466: bad argument #1 to 'pairs' (table expected, got number)
2023-12-02 20:37:56.644 WARNING LOG (26724): 1351 duplicate message(s) skipped.

is visible multiple times, due to

for i1,v1 in pairs(emitter_info) do
        for i2,v2 in ipairs(v1.audio) do
            if v2 ~= nil then
                v2:set(0.0)
            end
        end
    end

which probably clashes with audio in

 emitter_info[name] = {
        band = band,
        gain = gain,
        audio = {
            [SIGNAL_SEARCH] = get_param_handle(sounds[1]),
            [SIGNAL_LOCK] = get_param_handle(sounds[2]),
            [SIGNAL_LAUNCH] = get_param_handle(sounds[3]),
        },
        lights = lights,
    }

changed in https://github.com/heclak/community-a4e-c/commit/bbcd8bb85bf998efeff38491175561484d0c441a

To Reproduce Steps to reproduce the behavior:

  1. Start A-4e mission
  2. Observe logs

Expected behavior I'm not sure of the real effect, but that doesn't look right

Screenshots

Software Information (please complete the following information):

nadav-yo commented 12 months ago

I'm unable to replicate now, without any change.