Compare commits

...

2 commits

Author SHA1 Message Date
khtsly
5e2574ed84
Merge pull request #33 from Oreomial/patch-1
Some checks failed
Deploy / Build & Deploy (push) Has been cancelled
correct channel and payload in Server.Invoke
2026-09-06 12:04:03 +07:00
Oreomial
256167216e
correct channel and payload in Server.Invoke
Server.Invoke sent {reqId, args} on channel 0, but channel 0 on the
   client is reserved for resolving pending client-initiated invokes.
   The client never has a pending invoke matching a server-generated
   reqId, so the payload was silently dropped and the registered
   Client.Connect listener never ran - Server.Invoke always timed out.

   Channel 1 is the "execute registered listener and reply" channel.
   The client's remote == 1 handler expects {remoteId, reqId, args},
   so this also adds the missing remoteId so the client can find the
   correct listener in eventListeners.
2026-09-05 20:26:53 +00:00

View file

@ -181,8 +181,8 @@ Server.Invoke = function(remoteName: string, player: Player, timeout: number?, .
queueEvent[player] = {} :: any queueEvent[player] = {} :: any
end end
table.insert(queueEvent[player], { table.insert(queueEvent[player], {
0, 1,
{ reqId :: any, { ... } :: any } :: any, { Identifier.get_id(remoteName), reqId, { ... } } :: any,
}) })
return coroutine.yield() return coroutine.yield()
end end