TravelFailure: ServerTravelFailure, Reason for Failure: ''. Shutting down PIE

Got the Warning and the game quit after trying to host a game.

TravelFailure: ServerTravelFailure, Reason for Failure: ‘’. Shutting down PIE.

Any ideas?

void UPuzzlePlatformsGameInstance::Host()
{
    if (!ensure(GEngine != nullptr))
        return;

    UWorld *World = GetWorld();
    if (!ensure(World != nullptr))
        return;

    World->ServerTravel("/Game/PuzzlePlatforms/Maps/ThirdPersonMap?listen");
}

PuzzlePlatformsGameInstance.cpp

You don’t need to check for nullptr from GetWorld or the GEngine either as GetWorld does the checks. The only other thing I can think of is the path is wrong. Everything else looks correct.

In fact, to simplify, you could just do GetWorld()->ServerTravel.

The only other thing to check is that if Init is overrided, you are calling Super::Init();

Lastly, ensure Live coding is off.

Path is correct. Thanks, but GetWorld() not really do this check.

UWorld* UGameInstance::GetWorld() const
{
	return WorldContext ? WorldContext->World() : NULL;
}

Tried with override and without. Added Super::Init(); but nothing changed.

No difference.

If I launch the game via explorer with the project file everything works fine.

Check the source against end of lecture source. This code works so you may spot a difference.

What for me is bit strange that only if I run on Editor an try there to Host a game it crashes. But I try to find a difference.

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

Privacy & Terms