From b6cecf0082f46821b4a63b1cfc2fe70a75627bd7 Mon Sep 17 00:00:00 2001 From: Garry Newman Date: Mon, 13 May 2019 10:37:36 +0100 Subject: [PATCH] If SteamInternal.GameServer_Init returns false, print the parameters in the error --- Facepunch.Steamworks/SteamServer.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/SteamServer.cs b/Facepunch.Steamworks/SteamServer.cs index 0c0424e..873a9a8 100644 --- a/Facepunch.Steamworks/SteamServer.cs +++ b/Facepunch.Steamworks/SteamServer.cs @@ -57,13 +57,14 @@ namespace Steamworks System.Environment.SetEnvironmentVariable( "SteamAppId", appid.ToString() ); System.Environment.SetEnvironmentVariable( "SteamGameId", appid.ToString() ); + var secure = (int)(init.Secure ? 3 : 2); // // Get other interfaces // - if ( !SteamInternal.GameServer_Init( ipaddress, init.SteamPort, init.GamePort, init.QueryPort, (int)( init.Secure ? 3 : 2 ), init.VersionString ) ) + if ( !SteamInternal.GameServer_Init( ipaddress, init.SteamPort, init.GamePort, init.QueryPort, secure, init.VersionString ) ) { - throw new System.Exception( "InitGameServer returned false" ); + throw new System.Exception( $"InitGameServer returned false ({ipaddress},{init.SteamPort},{init.GamePort},{init.QueryPort},{secure},\"{init.VersionString}\")" ); } initialized = true;