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