Finish incomplete setence in High-level multiplayer tutorial (#9421)

Added clarification regarding the matching of function arguments in RPC signatures between server and client code.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
This commit is contained in:
Mateus Elias
2024-08-01 21:28:03 -03:00
committed by GitHub
parent 1586144704
commit b389d1d6ed

View File

@@ -201,10 +201,11 @@ must have the same name. When using ``add_child()`` for nodes which are expected
scripts and the server scripts, **even functions that are currently not in use**.
The signature of the RPC includes the ``@rpc()`` declaration, the function, return type,
AND the nodepath. If an RPC resides in a script attached to ``/root/Main/Node1``, then it
**and** the NodePath. If an RPC resides in a script attached to ``/root/Main/Node1``, then it
must reside in precisely the same path and node on both the client script and the server
script. Function arguments (example: ``func sendstuff():`` and ``func sendstuff(arg1, arg2):``
**will pass** signature matching).
script. Function arguments are not checked for matching between the server and client code
(example: ``func sendstuff():`` and ``func sendstuff(arg1, arg2):`` **will pass** signature
matching).
If these conditions are not met (if all RPCs do not pass signature matching), the script may print an
error or cause unwanted behavior. The error message may be unrelated to the RPC function you are