Quick answer: The @rpc annotation must be identical on the same method on every peer. Match the mode, transfer mode, and channel — mismatches are rejected.
A multiplayer game calls an RPC and gets “RPC config mismatch” or the call is silently dropped. The annotation differs between client and server builds, or the wrong authority is calling.
Identical Annotation Everywhere
@rpc("any_peer", "call_local", "reliable")
func request_fire(target_pos: Vector2):
...
Every peer running this script must have the exact same annotation. Since they run the same script, this is usually automatic — unless you have platform-conditional code.
Mode Meanings
- authority (default): only the node’s authority may call it on others.
- any_peer: any peer may call it (validate server-side!).
- call_local: also runs on the caller.
- reliable / unreliable / unreliable_ordered: transfer guarantee.
Authority Mismatch
With authority mode, calling from a non-authority peer is rejected. Check get_multiplayer_authority() — the node’s authority must be the caller. Use set_multiplayer_authority() at spawn to assign it.
Call Direction
# client -> server: use any_peer + rpc_id(1, ...)
request_fire.rpc_id(1, target)
# server -> all: rpc()
spawn_bullet.rpc(pos)
Match the mode to the direction you actually call.
Verifying
Host + client. RPCs fire without mismatch errors. Non-authority peers can’t spoof authority-only calls.
“The @rpc annotation is a contract. Both ends must agree on mode, reliability, and channel.”
For any ‘any_peer’ RPC, always re-validate inputs server-side — clients can call it with anything.