Multiplayer Gamemode not detecting second player

Hello

I am working on a multiplayer project for a few months now and I have a small understanding of how the networking in unreal works. I recently made some updates to the player controller and a number of other classes and everything seemed to be working fine. When I reopened the project yesterday things were taking much longer to load some AI controllers appeared out of no where and I couldn’t interact with anything save the HUD. Looking into it I realized that the following piece of code which I have not changed in months is not functioning properly.

I am running as a listen server and even tried changing to other run methods and no fix. Basically the get num players node is only returning 1 no matter what I do. I have not been able to find any explanation as to why when I clearly have 2 active players the check only registers one.

There is something else that may be unrelated when I use print string the debug text would indicate server: or client: It now no longer indicates client. The string line still prints but the text “client:” before the printed string no longer appears just the server one.

I have also tried rolling back to a previous version of the project that was functioning and the problem persists

Any help would be greatly appreciated

try delay the onpost login a bit. maybe players are not registered instantly.

also check num of players with the length of player array from gamestate.

this is what i do in my game:

Even going through the gamestate the player array is still only showing 1 somehow I have stopped the creation of 2 separate players. I am thinking their is a setting in class defaults or somewhere that I have changed without realizing its effect.


Also here is a picture of the debug print out you can see it references the serve side but not the client

did try it see second post

Solved it. My VPN was the problem, not sure why it started to be a problem suddenly but turning it off solved at least part of problem where the server couldn’t find the players

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.