Topic was automatically imported from the old Question2Answer platform.
Asked By
PiCode
I followed part 1 and 2 of this tutorial to make a multiplayer game, and then when I tried instancing more than 1 node into the server and then the client join, it gives this error:
ERROR: (Node not found: “World/Players/@Player@2” (relative to “/root”).)
at: (scene/main/node.cpp:1325)
ERROR: Failed to get cached path from RPC: World/Players/@Player@2.
at: _process_get_node (core/io/multiplayer_api.cpp:267)
ERROR: Invalid packet received. Requested node was not found.
RPC’s work with the sceneTree paths and it must be identical on all connected peers.
So if one tree looks like this
┖╴World
┖╴Players
┖╴Player2
and the other like this
┖╴World
┖╴Players
┖╴@Player@2
it will not work
to resolve the error, ensure you properly name all your instanced nodes so they can be reference correctly as this @Player@2 name scheme suggests you have duplicated nodes
Thanks for the answer, I fixed the error. For some reason, when I instance the two nodes, the Player2 name is “Player3”. So I changed the name to match both client and server and it worked.