summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes/@GDScript.xml
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2023-06-18 21:34:34 +0200
committerGitHub <noreply@github.com>2023-06-18 21:34:34 +0200
commit116f783db73f4bf7e9e96ae54dd3d0a20337cc8a (patch)
treeecac60cee2f4386ea73804615960c423be6d1fd7 /modules/gdscript/doc_classes/@GDScript.xml
parent4a0bb80b18cb8aac107fa71c382e7077b858c744 (diff)
parentddd9aa11b3d71d7f1712b3582565bbd39a511ba5 (diff)
downloadredot-engine-116f783db73f4bf7e9e96ae54dd3d0a20337cc8a.tar.gz
Merge pull request #76207 from dalexeev/clarify-rpc-docs
Clarify `@rpc` annotation arguments docs
Diffstat (limited to 'modules/gdscript/doc_classes/@GDScript.xml')
-rw-r--r--modules/gdscript/doc_classes/@GDScript.xml8
1 files changed, 6 insertions, 2 deletions
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 5a28246555..f2a65451a7 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -612,7 +612,7 @@
[/codeblock]
</description>
</annotation>
- <annotation name="@rpc" qualifiers="vararg">
+ <annotation name="@rpc">
<return type="void" />
<param index="0" name="mode" type="String" default="&quot;authority&quot;" />
<param index="1" name="sync" type="String" default="&quot;call_remote&quot;" />
@@ -620,7 +620,11 @@
<param index="3" name="transfer_channel" type="int" default="0" />
<description>
Mark the following method for remote procedure calls. See [url=$DOCS_URL/tutorials/networking/high_level_multiplayer.html]High-level multiplayer[/url].
- The order of [param mode], [param sync] and [param transfer_mode] does not matter and all arguments can be omitted, but [param transfer_channel] always has to be the last argument. The accepted values for [param mode] are [code]"any_peer"[/code] or [code]"authority"[/code], for [param sync] are [code]"call_remote"[/code] or [code]"call_local"[/code] and for [param transfer_mode] are [code]"unreliable"[/code], [code]"unreliable_ordered"[/code] or [code]"reliable"[/code].
+ The accepted values:
+ - for [param mode] are [code]"any_peer"[/code] or [code]"authority"[/code];
+ - for [param sync] are [code]"call_remote"[/code] or [code]"call_local"[/code];
+ - and for [param transfer_mode] are [code]"unreliable"[/code], [code]"unreliable_ordered"[/code], or [code]"reliable"[/code].
+ The order of [param mode], [param sync] and [param transfer_mode] does not matter, but values related to the same argument must not be used more than once. [param transfer_channel] always has to be the 4th argument (you must specify 3 preceding arguments).
[codeblock]
@rpc
func fn(): pass