Closed Nusiq closed 7 months ago
Can confirm this is still hapening on 4.1, windows
4.1 hasn't been released, can you be more explicit?
4.1 hasn't been released, can you be more explicit?
Sorry, the commit is 8d501a2dc31f3bef6d5a7f6b0d060c8915082011
I think the reason is the same as #76841: binary serialization does not currently support typed arrays, so type information is lost in multiplayer.
Text serialization:
Binary serialization:
@dalexeev , @akien-mga , I can still reproduce this one on v4.2.
This is causing an error:
@rpc("call_remote", "any_peer", "reliable")
func characterclasscomponent_sync_class_change(n: String, c: Array[String]):
E 0:00:29:0132 _process_rpc: RPC - 'Node(sync.gd)::characterclasscomponent_sync_class_change': Cannot convert argument 2 from Array to Array
<C++ Source> modules/multiplayer/scene_rpc_interface.cpp:290 @ _process_rpc()
Godot version
Godot_v4.0-beta6_win64
System information
Windows 11
Issue description
Godot gives me an error when I try to execute an rpc function that has an argument annotated as
Array[int]
, but it works fine when I remove the type annotation or change it to justArray
. The data I'm sending is anArray[int]
.This is the code of the function (it doesn't work when it has the argument type annotation):
When I try to trigger the rpc from the host it gives me this error:
Removing the annotation fixes the problem.
Steps to reproduce
Main.gd
script by removing type annotation on line 28Minimal reproduction project
RpcIntArrayIssueExample.zip