RPC just randomly stopped working

Godot Version

4.2, and 4.3 beta 3

Question

1 time one I started my game, the RPC functions just stopped working.
I changed nothing, the path are 100% the same and the functions are identical on client and server, implemented on client.
when I call the function the client just isn’t receiving it.
It happed in the past and was fixed by changing the function name (idk why) now it doesn’t anymore.

Some code:

Server
func updateDataToPlayers():
	for player in res.players.keys():
		onDataGot.rpc_id(player, server.encode(res))

@rpc("any_peer", "call_local")
func onDataGot(_data: Dictionary):
	pass

Client
@rpc("any_peer", "call_local")
func onDataGot(_data: Dictionary):
    # Never called
	var roomRes: RoomRes = Util.dict2inst(_data)

Actually it was fixed by rpc_config and Node.rpc_id and some stuff but other (RPC) functions just stopped working (or maybe they were broken all along, the game isnt usable without onDataGot) so I would be glad to use the normal methods.
Thanks!

P.S ugrading to 4.3 beta 3 (latest) didn’t help :confused:

Where are you calling the client script’s onDataGot? Seems like only the server is using it’s own onDataGot.

Is the client script part of players? do you mean to use player.onDataGot?

No no, everything worked fine.
Btw I fixed it, turns out it’s a bug where I’ve added new RPC only on the client (that had nothing to do with the problematic function and wasn’t needed on the server) so I just added it without impl to the server.
See RPCs are not being received for this particular Node

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.