TriggerEvent parameters not being passed

  1. Client (production/canary) and FXServer version:
    Canary/3816
  2. What you expected to happen
    All parameters to be passed, even after one of them was nil
  3. What actually happens
    No more parameters are passed after a nil one is reached.
  4. Category of bug (eg. client, server, weapons, peds, native)
    native
  5. Reproducible steps, preferably with example script(s)
AddEventHandler("yes", function(...)

    local args = {...}

    print (json.encode(args))

end)

TriggerEvent("yes", 69, nil, 274)

lol, nice assumption /s

Known, I believe this was fixed once already but maybe never got applied/regressed with msgpack refactors, issue is internally Lua tables are used and as known Lua tables can’t contain nil.

1 Like

A fix was never applied and should still be residing on one of my abandoned branches. Although, it can be improved since: msgpack.null() == msgpack.null and stored as an upval in scheduler.lua.

I don’t have the ability to test the fix on client at the moment so I cannot guarantee it causing any regressions.