Warning OSS: No Game Present to join for session (GameSession)

When I run the script to start a host session, the game starts up and gives “Warning: OSS: No Game Present to join for session (GameSession)”

I cannot see any other players when I start up a host listener+client.

When I open up the project file in unreal, it’s set to two players.

Here’s the .bat script I am using:


@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION

REM =======MAKE SURE TO ADJUST THESE PARAMETERS TO YOUR BUILD=======
set unrealPath=“D:\games\UE_5.0\Engine\Binaries\Win64\UnrealEditor.exe”

set myProject=“C:\Users\ragna\OneDrive\Documents\Unreal Projects\Puzzle__Platforms 5.0\Puzzle__Platforms.uproject”

set map=/Game/ThirdPerson/Maps/ThirdPersonMap

REM=================================================================

set LF=^

REM Two empty lines above are necessary

REM =====================NOTES====================================
REM can add -server to boot as a server (instead of a game)
REM can add -game to boot as a game
REM can add -log
REM can add a map via: /Game/ExampleMapName -game -log
REM can add an IP address instead of the map
REM can add ?listen directly after ExampleMapName for Host machines (e.g., Play and Host) (without the -server tag)
REM =============================================================

REM Set myIP and port to blank (uncomment the bottom lines, comment the top lines) to use user-prompted values
set myIP=127.0.0.1
REM set “myIP=”

set port=7777
REM set “port=”
REM =============================================================

set “launched=”
set /a clients=0
set /a servers=0
set /a hosts=0
set /a standalones=0

if “!myIP!”=="" (
set /p myIP=“localhost”
)

if “!port!”=="" (
echo.
set /p port=“7777”
)

:LAUNCH

echo.
echo Local IP: “!myIP!”
echo.
echo Local Port: “!port!”
echo.

if not “!launched!”=="" (
echo Launched: !launched!
) else (
echo Launched: none
)
echo.

set “launchType=”
set /p launchType=“Launch as standalone (blank), server (s), host+client (h), or client (c)?!LF!”

echo.

if “!launchType!”=="" (
set launched=!launched!Standalone,

set launchParams=!map! -game -log

set /a standalones=!standalones!+1
set launchType=standalone !standalones!

)

if /I “!launchType!”==“c” (
set launched=!launched!Client,

set launchParams=!myIP!:!port! -game -log

set /a clients=!clients!+1
set launchType=client !clients!

)

if /I “!launchType!”==“s” (
set launched=!launched!Server,

set launchParams=!map! -server -log

set /a servers=!servers!+1
set launchType=server !servers!

)

if /I “!launchType!”==“h” (
set launched=!launched!Host,

set launchParams=!map!?listen 127.0.0.1 -game -log

set /a hosts=!hosts!+1
set launchType=host !hosts!

)

set launch=“UnrealEngine !launchType!” !unrealPath! !myProject! !launchParams!

echo start !launch!
Start !launch!
echo.

cls

GOTO LAUNCH

Hi,
Have you checked your code against the end of lecture.

Have you also tried not using the batch file? It seems awfully complicated for something that is simply 1 line. If you use powershell, pressing the up arrow let’s you go through the lines you last run even between sessions.

You need to review the log as well and perhaps share here the relevant parts.

1 Like

I will try this later today. Thank you!

1 Like

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

Privacy & Terms