Skip to content

Commit 7e573ea

Browse files
ObaulGAThousandShipsCalinou
authored
Document requirement of having client + server RPCs in High-level multiplayer (godotengine#7932)
Co-authored-by: A Thousand Ships <[email protected]> Co-authored-by: Hugo Locurcio <[email protected]>
1 parent ead42d7 commit 7e573ea

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tutorials/networking/high_level_multiplayer.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,16 @@ For a remote call to be successful, the sending and receiving node need to have
196196
must have the same name. When using ``add_child()`` for nodes which are expected to use RPCs, set the argument
197197
``force_readable_name`` to ``true``.
198198

199+
.. warning::
200+
201+
If a function is annotated with ``@rpc`` on the client script (resp. server script),
202+
then this function must also be declared on the server script (resp. client script),
203+
and both must have the same signature, **even if this function is not currently used**.
204+
205+
If these conditions are not fulfilled, the script may print an error or
206+
cause unwanted behavior. See further explanation and troubleshooting on
207+
`this post <https://github.com/godotengine/godot/issues/57869#issuecomment-1034215138>`__.
208+
199209
The annotation can take a number of arguments, which have default values. ``@rpc`` is equivalent to:
200210

201211
::

0 commit comments

Comments
 (0)