mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2024-12-27 07:05:50 +03:00
If SteamInternal.GameServer_Init returns false, print the parameters in the error
This commit is contained in:
parent
6a2db11c5d
commit
b6cecf0082
@ -57,13 +57,14 @@ public static void Init( AppId appid, SteamServerInit init )
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user