Hello community, I'm currently trying to set up a server with PlayFab. I've managed to deploy a server on Microsoft Azure. However, when I try to open the menu directly in UE5, I encounter an error. I've been searching for a solution to my problem for 3 or 4 days now, but I haven't found one yet.
bool UGSDKUtils::SetDefaultServerHostPort()
{
//If we're running a local test server then we don't want to check the host port as the MPS won't be present
if (!FPlayFabGSDKModule::Get().GetIsUsingGsdk()) return true;
auto ConnectionInfo = GetGameServerConnectionInfo();
// Override the internal Unreal Game Server hosting port number, with one driven from Game Manager
// A game server hosted in MPS won't be accessible by clients unless it uses the port that MPS has configured for it.
int32 UnrealServerGsdkHostPort = -1;
for (auto& GamePorts : ConnectionInfo.GamePortsConfiguration) {
// "UnrealServerGsdkHostPort" is documented as the name of a required port when using the internal Unreal Game Server hosting mechanism
if (GamePorts.Name == TEXT("gameport")) {
UE_LOG(LogPlayFabGSDK, Warning, TEXT("GSDK Game server listening port: %d"), GamePorts.ServerListeningPort);
UE_LOG(LogPlayFabGSDK, Warning, TEXT("GSDK Game client connection port: %d"), GamePorts.ClientConnectionPort);
UnrealServerGsdkHostPort = GamePorts.ServerListeningPort;
break;
}
}
if (UnrealServerGsdkHostPort == -1)
{
UE_LOG(LogPlayFabGSDK, Fatal, TEXT("Unreal GSDK requires a named port: gameport. This was not provided by MPS build port-configuration."));
return false;
}
UE_LOG(LogPlayFabGSDK, Warning, TEXT("Assigning Unreal Server Host Port to MPS port: %d"), UnrealServerGsdkHostPort);
FURL::UrlConfig.DefaultPort = UnrealServerGsdkHostPort;
return true;
}
void UGSDKUtils::ReadyForPlayers()
{
FPlayFabGSDKModule::Get().ReadyForPlayers();
}
At launch, the game writes:
Fatal error: [File:D:\Psykotik Panda\Projet\PlayfabMenu\Plugins\PlayFabGSDK\Source\PlayfabGSDK\Private\GSDKUtils.cpp] [Line: 183]
Unreal GSDK requires a named port: gameport. This was not provided by MPS build port-configuration.
I've looked into my 'GSDKUtils.cpp' file but I can't find where to fix my issue. I hope I'll find some help here. Best regards, Jacot!