Closed BoomerDev closed 2 years ago
@BoomerDev Please upload a minimal reproduction project to make this easier to troubleshoot.
Same problem here, if you send a rpc with out arg like : rpc(&"testfunc")
try putting @rpc before any functions that contain an rpc_id().
Likely a duplicate of #59939 / https://github.com/godotengine/godot/issues/59972#issuecomment-1091971779
Closing in favor of #59939 which has more details.
Godot version
4.0.alpha5
System information
Windows 10, Vulkan Clustered, GeForce RTX 2060
Issue description
I am working on a multiplayer prototype with Godot 4.0 alpha5, and I have run into an issue with the RPC system. I am using a client-server model, and on my client, I have this test function:
@rpc func some_function(): print("Test function called.")
and on my server I have this code:
func _on_peer_connected(pid: int): rpc_id(pid, "some_function")
All my Godot multiplayer knowledge is coming from 3.x, so maybe this could be a bug, or me just being stupid.
Steps to reproduce
none
Minimal reproduction project
No response
Edit: I forgot to note that the error I keep getting is this: 'Unable to get the RPC configuration for the function "some_function" at path: "/root/Network". This happens when the method is missing or not marked for RPCs in the local script.'