Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when lauching game #7

Open
RamsaySummer opened this issue Jul 17, 2020 · 5 comments
Open

Error when lauching game #7

RamsaySummer opened this issue Jul 17, 2020 · 5 comments

Comments

@RamsaySummer
Copy link

RamsaySummer commented Jul 17, 2020

When I try to 'Start game' on client, I can't use the diffferent up down left movement and the server says:

MYNamePLAYER
on_register_player: 87419819
Creating player in lobby
Total players: 1
ERROR: Node not found: Game.
At: scene/main/node.cpp:1381
ERROR: _process_get_node: Failed to get path from RPC: Game.
At: core/io/multiplayer_api.cpp:256
ERROR: Invalid packet received. Requested node was not found.
At: core/io/multiplayer_api.cpp:204
Entering game
Creating player game object
ERROR: Signal 'remove_player' is already connected to given method 'remove_player' in that object.
At: core/object.cpp:1464

I am on W10 and i export the server project on the server folder '.exe and pck' and the client exe on client folder.

Is this a bad export of me ?

@Wavesonics
Copy link
Owner

Does the game crash or malfunction in some way? Or is it just printing these errors?

@Drazuam
Copy link

Drazuam commented Sep 24, 2020

I am having the same issue. The windows server export does seems to malfunction - it will not take input from the clients. Of note, the server seems to hit this error while attempting to change the scene to ServerGame. I am attempting to export this via Godot 3.2.2 stable.

If there's any additional info I can help provide, let me know. I'm just getting my feet under me with Godot but hopefully I can be of help

edit: I've tried 3.2.3 as well but no luck

@Drazuam
Copy link

Drazuam commented Sep 24, 2020

Some more information -
Server seems to work correctly when run as a scene directly from Godot, but not in the exported .exe

Interesting... I wonder if we're messing up the export somehow? I didn't change any of the settings.

@Drazuam
Copy link

Drazuam commented Sep 24, 2020

I figured it out!
Line 31 of Game.gd may end up firing on the client before the server has loaded the ServerGame scene! In cases where this happens, the scene is unavailable and therefore is unable to be referenced by the client's RPC. I figured this out by placing a 500ms sleep before the RPC call, and it works fine. In theory, you could either preload the ServerGame node or send a signal to clients that the Game node is available, and only after that would they attempt RPCs

@Wavesonics
Copy link
Owner

Ah good catch! I never encountered this in my own project because there is a count down in the lobby when the game starts, and the server goes before the count down starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants