Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteamInternal_GameServer_Init_V2 requires valid pszInternalCheckInterfaceVersions as of version 1.58 #632

Closed
RodGreen opened this issue Jul 12, 2024 · 3 comments

Comments

@RodGreen
Copy link

With latest 1.60 I'm getting an error k_ESteamAPIInitResult_VersionMismatch when running GameServer.Init.

According to another reference, I found they mentioned that SteamWorks 1.58+ requires a valid pszInternalCheckInterfaceVersions header built the same as the one defined in the SteamGameServer_InitEx

	const char *pszInternalCheckInterfaceVersions = 
		STEAMUTILS_INTERFACE_VERSION "\0"
		STEAMNETWORKINGUTILS_INTERFACE_VERSION "\0"

		STEAMGAMESERVER_INTERFACE_VERSION "\0"
		STEAMGAMESERVERSTATS_INTERFACE_VERSION "\0"
		STEAMHTTP_INTERFACE_VERSION "\0"
		STEAMINVENTORY_INTERFACE_VERSION "\0"
		STEAMNETWORKING_INTERFACE_VERSION "\0"
		STEAMNETWORKINGMESSAGES_INTERFACE_VERSION "\0"
		STEAMNETWORKINGSOCKETS_INTERFACE_VERSION "\0"
		STEAMUGC_INTERFACE_VERSION "\0"
		"\0";
@RodGreen
Copy link
Author

Tried using this and still getting the error, any idea what might be the issue, I've confirmed all the versions match the DLLs.

var sb = new StringBuilder();
sb.Append(Constants.STEAMUTILS_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMNETWORKINGUTILS_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMGAMESERVER_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMGAMESERVERSTATS_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMHTTP_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMINVENTORY_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMNETWORKING_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMNETWORKINGMESSAGES_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMNETWORKINGSOCKETS_INTERFACE_VERSION).Append('\0');
sb.Append(Constants.STEAMUGC_INTERFACE_VERSION).Append('\0');
sb.Append('\0');

InteropHelp.UTF8StringHandle pszInternalCheckInterfaceVersions = new InteropHelp.UTF8StringHandle(sb.ToString());

@zackman0010
Copy link

@RodGreen @rlabrecque I've found the issue with this. The definition of SteamInternal_GameServer_Init_V2 did not match the header file, so the arguments being passed to the function were incorrect. That's why RodGreen's attempt was unsuccessful. I submitted PR #633 to correct this.

@rlabrecque
Copy link
Owner

Thanks zackman! That would have not been fun to figure out!

I put up an alternative version based on yours here if you have time could you two take a look? Primarily because we needed to make the changes outside of the autogen folder as well.

#634

rlabrecque added a commit that referenced this issue Jul 29, 2024
Fix initializing on GameServers and added InitEx for them (Fixes #632, thanks to @zackman0010)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants