I’m just starting out with unreal. This is the only bit of code I’m writing, into the public section of the default third person character cpp file
DefaultCharacter.h
UFUNCTION(BlueprintCallable)
void OpenLobby();
DefaultCharacter.cpp
void AMPGCharacter::OpenLobby()
{
UE_LOG(LogTemp, Warning, TEXT("Opening lobby..."));
UWorld* world = GetWorld();
if(world)
{
UE_LOG(LogTemp, Warning, TEXT("Travelling with my new server..."));
world->ServerTravel("Game/ThirdPerson/Lobby?listen");
}else
{
UE_LOG(LogTemp, Error, TEXT("Lobby not available"));
}
}
The blueprint is configured very simply as:
When I press 0, the screen just flicks a bit, don’t really get much errors in the log, but, the level doesn’t seem to load, this is the log output:
LogTemp: Warning: Opening lobby...
LogTemp: Warning: Travelling with my new server...
LogGameMode: ProcessServerTravel: Game/ThirdPerson/Lobby?listen
LogNet: Browse: 127.0.0.1:17777/Game/ThirdPerson/Maps/ThirdPersonMap?game=/Script/MPG.MPGGameMode
LogNet: World NetDriver shutdown IpNetDriver_35 [GameNetDriver]
LogNet: DestroyNamedNetDriver IpNetDriver_35 [GameNetDriver]
LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_26, Driver: GameNetDriver IpNetDriver_35, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F, Channels: 12, Time: 2022.10.23-10.16.20
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_26, Driver: GameNetDriver IpNetDriver_35, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F
LogExit: GameNetDriver IpNetDriver_35 shut down
LogInit: WinSock: Socket queue. Rx: 32768 (config 32768) Tx: 32768 (config 32768)
LogNet: Created socket for bind address: 0.0.0.0 on port 0
PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: Game client on port 17777, rate 100000
LogNet: UChannel::ReceivedSequencedBunch: Bunch.bClose == true. ChIndex == 0. Calling ConditionalCleanUp.
LogNet: UChannel::CleanUp: ChIndex == 0. Closing connection. [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:59984, Name: IpConnection_27, Driver: GameNetDriver IpNetDriver_34, IsServer: YES, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F
LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:59984, Name: IpConnection_27, Driver: GameNetDriver IpNetDriver_34, IsServer: YES, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F, Channels: 12, Time: 2022.10.23-10.16.20
LogNet: UNetConnection::Close: CloseReason:
LogNet: - Result=ControlChannelClose, ErrorContext="ControlChannelClose"
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:59984, Name: IpConnection_27, Driver: GameNetDriver IpNetDriver_34, IsServer: YES, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F
LogOnlineSession: Warning: OSS: No game present to leave for session (GameSession)
LogNet: NotifyAcceptingConnection: Server ThirdPersonMap refused
LogNet: NotifyAcceptingConnection: Server ThirdPersonMap refused
LogNet: NotifyAcceptingConnection: Server ThirdPersonMap refused
LogEngine: Server switch level: /Game/ThirdPerson/Maps/ThirdPersonMap
LogNet: Browse: :17777/Game/ThirdPerson/Maps/ThirdPersonMap?Listen
LogLoad: LoadMap: :17777/Game/ThirdPerson/Maps/ThirdPersonMap?Listen
LogWorld: BeginTearingDown for /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap
LogNet: World NetDriver shutdown IpNetDriver_34 [GameNetDriver]
LogNet: DestroyNamedNetDriver IpNetDriver_34 [GameNetDriver]
LogExit: GameNetDriver IpNetDriver_34 shut down
LogWorld: UWorld::CleanupWorld for ThirdPersonMap, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
LogAudio: Display: Audio Device unregistered from world 'None'.
LogUObjectHash: Compacting FUObjectHashTables data took 1.41ms
LogPlayLevel: Creating play world package: /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap
LogWorldPartition: Initial Data Layer Effective States Activated() Loaded()
LogPlayLevel: PIE: StaticDuplicateObject took: (0.003271s)
LogPlayLevel: PIE: Created PIE world by copying editor world from /Game/ThirdPerson/Maps/ThirdPersonMap.ThirdPersonMap to /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap (0.003341s)
LogAudio: Display: Audio Device (ID: 20) registered with world 'ThirdPersonMap'.
LogChaos: FPhysicsSolverBase::AsyncDt:-1.000000
LogAIModule: Creating AISystem for world ThirdPersonMap
LogWorldPartition: Display: WorldPartition initialize started...
LogWorldPartition: UWorldPartition::Initialize(IsEditor=0, IsGame=0, IsCooking=0)
LogWorldPartition: Display: WorldPartition initialize took 677 us
LogPlayLevel: PIE: World Init took: (0.001438s)
LogLoad: Game class is 'MPGGameMode'
LogNet: ReplicationDriverClass is null! Not using ReplicationDriver.
LogNetCore: DDoS detection status: detection enabled: 0 analytics enabled: 0
LogInit: WinSock: Socket queue. Rx: 131072 (config 131072) Tx: 131072 (config 131072)
LogNet: Created socket for bind address: 0.0.0.0 on port 17777
PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: GameNetDriver IpNetDriver_37 IpNetDriver listening on port 17777
LogWorld: Bringing World /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap up for play (max tick rate 0) at 2022.10.23-16.01.24
LogWorld: Bringing up level for play took: 0.000923
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
LogLoad: Took 0.045270 seconds to LoadMap(/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap)
LogNet: NotifyAcceptingConnection accepted from: 127.0.0.1:64811
LogHandshake: SendConnectChallenge. Timestamp: 0.110064, Cookie: 208191195041133134142044188089066243160008031215003019020220
LogHandshake: SendChallengeResponse. Timestamp: 0.110064, Cookie: 208191195041133134142044188089066243160008031215003019020220
LogNet: NotifyAcceptingConnection accepted from: 127.0.0.1:64811
LogHandshake: SendChallengeAck. InCookie: 208191195041133134142044188089066243160008031215003019020220
LogNet: Server accepting post-challenge connection from: 127.0.0.1:64811
PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: NotifyAcceptedConnection: Name: ThirdPersonMap, TimeStamp: 10/23/22 16:01:25, [UNetConnection] RemoteAddr: 127.0.0.1:64811, Name: IpConnection_29, Driver: GameNetDriver IpNetDriver_37, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: 127.0.0.1:64811, Name: IpConnection_29, Driver: GameNetDriver IpNetDriver_37, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: UPendingNetGame::SendInitialJoin: Sending hello. [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_28, Driver: PendingNetDriver IpNetDriver_36, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: NotifyAcceptingChannel Control 0 server World /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap.ThirdPersonMap: Accepted
LogNet: Remote platform little endian=1
LogNet: This platform little endian=1
LogNet: Login request: ?game=/Script/MPG.MPGGameMode?Name=DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F userId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F platform: NULL
LogNet: Welcomed by server (Level: /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap, Game: /Script/MPG.MPGGameMode)
LogLoad: LoadMap: 127.0.0.1:17777/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap?game=/Script/MPG.MPGGameMode
LogWorld: BeginTearingDown for /Game/ThirdPerson/Maps/UEDPIE_1_ThirdPersonMap
LogWorld: UWorld::CleanupWorld for ThirdPersonMap, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
LogAudio: Display: Audio Device unregistered from world 'None'.
LogUObjectHash: Compacting FUObjectHashTables data took 1.39ms
LogWorldPartition: Initial Data Layer Effective States Activated() Loaded()
LogAudio: Display: Audio Device (ID: 21) registered with world 'ThirdPersonMap'.
LogChaos: FPhysicsSolverBase::AsyncDt:-1.000000
LogWorldPartition: Display: WorldPartition initialize started...
LogWorldPartition: UWorldPartition::Initialize(IsEditor=0, IsGame=0, IsCooking=0)
LogWorldPartition: Display: WorldPartition initialize took 657 us
LogPlayLevel: PIE: World Init took: (0.001278s)
LogWorld: Bringing World /Game/ThirdPerson/Maps/UEDPIE_1_ThirdPersonMap.ThirdPersonMap up for play (max tick rate 0) at 2022.10.23-16.01.25
LogWorld: Bringing up level for play took: 0.000835
LogLoad: Took 0.034397 seconds to LoadMap(/Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap)
LogWorldPartition: New Streaming Source: PlayerController_0 -> Position: X=0.000 Y=0.000 Z=0.000
LogWorldPartition: Warning: Invalid world bounds, grid partitioning will use a runtime grid with 1 cell.
LogNet: Client netspeed is 100000
LogNet: Join request: /Game/ThirdPerson/Maps/ThirdPersonMap?game=/Script/MPG.MPGGameMode?Name=DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F?SplitscreenCount=1
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
LogNet: Join succeeded: DESKTOP-8MIT8VQ-8F44
LogWorldPartition: New Streaming Source: PlayerController_1 -> Position: X=0.000 Y=0.000 Z=0.000
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
LogOnlineSession: Warning: OSS: No game present to join for session (GameSession)
LogSlate: Updating window title bar state: overlay mode, drag disabled, window buttons hidden, title bar hidden
LogWorld: BeginTearingDown for /Game/ThirdPerson/Maps/UEDPIE_1_ThirdPersonMap
LogSlate: Window 'MPG Preview [NetMode: Client 1] (64-bit/SM5)' being destroyed
LogWorld: UWorld::CleanupWorld for ThirdPersonMap, bSessionEnded=true, bCleanupResources=true
LogSlate: InvalidateAllWidgets triggered. All widgets were invalidated
LogNet: World NetDriver shutdown IpNetDriver_36 [GameNetDriver]
LogNet: DestroyNamedNetDriver IpNetDriver_36 [GameNetDriver]
LogNet: UNetConnection::Close: [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_28, Driver: GameNetDriver IpNetDriver_36, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F, Channels: 11, Time: 2022.10.23-10.16.26
LogNet: UChannel::Close: Sending CloseBunch. ChIndex == 0. Name: [UChannel] ChIndex: 0, Closing: 0 [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_28, Driver: GameNetDriver IpNetDriver_36, IsServer: NO, PC: PlayerController_1, Owner: PlayerController_1, UniqueId: NULL:DESKTOP-8MIT8VQ-8F44B6624D1C4437F58991AC2B95E05F
LogExit: GameNetDriver IpNetDriver_36 shut down
LogWorld: BeginTearingDown for /Game/ThirdPerson/Maps/UEDPIE_0_ThirdPersonMap
Don’t really understand much from the logs. What might the issue probably be? I’ve checked if blueprint is compiled and saved, there’s also no error when building the code, live coding’s working fine, but, I can’t really press 0 to hop to the designated level.