Find Session is finding a game that doesn't exist

I’m brand spanking new to the multiplayer aspect of unreal and have watched numerous tutorials and got one working, until I tried to edit it slightly to make it more suitable to my games needs.
How I want it to work is you click play game and it searches for games and if it doesn’t find one it creates a new lobby, if it does find one then it joins the existing lobby. The problem is, while I’m testing this, it keeps telling me that it finds a lobby with the server name “” and a ping of 9999. Whenever it tries to Join Session it fails immediately.

This code was working before until I made a slight change, and now even when I undo my change it keeps finding a game that doesn’t exist. Also this code is located in my GameInstance, is that an issue?

I even tried to filter out the sessions within the For Each Loop to filter out any sessions with a Server Name = “” or a ping of 9999, but it still somehow finds the same session with no server name and a ping of 9999.

Turns out my issue was that when there were no sessions to be found the FoundSessions array would be empty, BUT, the For Each loop would still run and immediately which would then read my print string saying ‘Session found’ although non were ever actually found.

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