Download

Issue Getting Steam UID

Thats exactly what I was telling you :smiley:

Yea posted within a minute of each other haha, thanks again for watching this thread :slight_smile: would of sucked to take steam out since i would of had to put the account system back in that i completely deleted and used the steamID for.

No problem :slight_smile: If you have further problems, just tell 'em!

did you ever sort out dedicated servers and how to join them with steam? i have a thread in elsewhere but no one seems to have an answer. i have steam running, i get what i think is a good message from the server log…
e781f9a04d2c559eb5881f9802ab50df6a028b15.png

but i have no clue how to connect to it. i want it to be the only server to be connected to, i didnt want to have to search sessions (which i read may not work anyways) i just want to console command open to it… i tried
open ip:port
<mysteamid>:port

and neither seem to work.

going to try:



#include "ThirdParty/Steamworks/Steamv132/sdk/public/steam/steam_gameserver.h"


FString UMyServerBlueprintLibrary::GetServerSteamID() {

	if (SteamAPI_Init()) {

		//Return ID as String if Found
		return FString::FromInt(SteamGameServer_GetSteamID());
		);
	}

	return "Unknown";
}

but even if it works it will MAYBE give me the steam id of the server instance, but if it changes im going to be screwed lol.

So servers have the same SteamID as the user who hosts it? I’m not quite sure since I never done this, but you may check out this, because that topic seems to deal with server authentification…

if i try to do what i mentioned it wont compile the dedicated server for some reason. so taht is out of the question. what you posted i have to have an account to view im guessing? since it has no info there that i can see.

You can log in with your normal Steam account there! So if you say your won’t compile, make sure that you also add Steamworks and the OnlineSubsystem parts to the Server.Build.cs!

i dont have a server.build.cs…

0510d8160b.png

and the server compiles, just not if i use anything from #include “ThirdParty/Steamworks/Steamv132/sdk/public/steam/steam_gameserver.h”

[SPOILER]
Running AutomationTool…
Program.Main: Executed from AutomationToolLauncher (C:\Users\Kilrath\AppData\Local\assembly\dl3\OA4XE3E0.DG1\XG562N1G.KPR\5369992e\6681f5ab_ff61d101\AutomationTool.exe)
Program.Main: CWD=K:\Development\UnrealEngine-4.10\Engine\Binaries\DotNET
Automation.ParseCommandLine: Parsing command line: BuildCookRun -project=C:/Users/Kilrath/Documents/Unreal Projects/MGame/MGame.uproject -noP4 -clientconfig=Development -serverconfig=Development -nocompile -utf8output -server -serverplatform=Win64 -build -cook -map=MainLevel+MainMenu+Transition -unversionedcookedcontent -compressed
Automation.Process: IsBuildMachine=False
Automation.Process: ShouldKillProcesses=True
Automation.Process: Setting up command environment.
CommandUtils.SetEnvVar: SetEnvVar uebp_EngineSavedFolder=K:/Development/UnrealEngine-4.10/Engine/Programs/AutomationTool/Saved
CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(K:/Development/UnrealEngine-4.10/Engine/Programs/AutomationTool/Saved/Logs)
WindowsHostPlatform.SetFrameworkVars: Setting .Net Framework environment variables.
WindowsHostPlatform.SetFrameworkVars: Supports64bitExecutables=True
WindowsHostPlatform.SetFrameworkVars: WindowsPlatform.CompilerVisualStudio2015
WindowsHostPlatform.SetFrameworkVars: WindowsSDKDir=C:\Program Files (x86)\Windows Kits\8.1
WindowsHostPlatform.SetFrameworkVars: BaseVSToolPath=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools
WindowsHostPlatform.SetFrameworkVars: Setting VS environment variables via C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools…\VC\bin\x86_amd64\vcvarsx86_amd64.bat.
CommandUtils.SetEnvVar: SetEnvVar FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
CommandUtils.SetEnvVar: SetEnvVar FrameworkVersion=v4.0.30319
WindowsHostPlatform.SetFrameworkVars: FrameworkDir=C:\WINDOWS\Microsoft.NET\Framework
WindowsHostPlatform.SetFrameworkVars: FrameworkVersion=v4.0.30319
ProjectUtils.CleanupFolders: Cleaning up project rules folder
CommandUtils.DeleteDirectoryContents: DeleteDirectoryContents(K:\Development\UnrealEngine-4.10\Engine\Programs\AutomationTool\Saved\Rules)
Automation.Process: Compiling scripts.
ScriptCompiler.LoadPreCompiledScriptAssemblies: Loading precompiled script DLLs
ScriptCompiler.LoadPreCompiledScriptAssemblies: Found 9 script DLL(s).
BuildCookRun.SetupParams: Setting up ProjectParams for C:\Users\Kilrath\Documents\Unreal Projects\MGame\MGame.uproject
ProjectUtils.CompileAndLoadTargetsAssembly: Compiling targets DLL: K:\Development\UnrealEngine-4.10\Engine\Programs\AutomationTool\Saved\Rules\UATRules1534098467.dll
ProjectParams.ValidateAndLog: Project Params **************
ProjectParams.ValidateAndLog: AdditionalServerMapParams=
ProjectParams.ValidateAndLog: Archive=False
ProjectParams.ValidateAndLog: ArchiveMetaData=False
ProjectParams.ValidateAndLog: CreateAppBundle=True
ProjectParams.ValidateAndLog: BaseArchiveDirectory=C:\Users\Kilrath\Documents\Unreal Projects\MGame\ArchivedBuilds
ProjectParams.ValidateAndLog: BaseStageDirectory=C:\Users\Kilrath\Documents\Unreal Projects\MGame\Saved\StagedBuilds
ProjectParams.ValidateAndLog: Build=True
ProjectParams.ValidateAndLog: Cook=True
ProjectParams.ValidateAndLog: Clean=
ProjectParams.ValidateAndLog: Client=False
ProjectParams.ValidateAndLog: ClientConfigsToBuild=Development
ProjectParams.ValidateAndLog: ClientCookedTargets=MGame
ProjectParams.ValidateAndLog: ClientTargetPlatform=Win64
ProjectParams.ValidateAndLog: Compressed=True
ProjectParams.ValidateAndLog: UseDebugParamForEditorExe=False
ProjectParams.ValidateAndLog: CookFlavor=
ProjectParams.ValidateAndLog: CookOnTheFly=False
ProjectParams.ValidateAndLog: CookOnTheFlyStreaming=False
ProjectParams.ValidateAndLog: UnversionedCookedContent=True
ProjectParams.ValidateAndLog: SkipCookingEditorContent=False
ProjectParams.ValidateAndLog: NumCookersToSpawn=0
ProjectParams.ValidateAndLog: GeneratePatch=False
ProjectParams.ValidateAndLog: CreateReleaseVersion=
ProjectParams.ValidateAndLog: BasedOnReleaseVersion=
ProjectParams.ValidateAndLog: DLCName=
ProjectParams.ValidateAndLog: DLCIncludeEngineContent=False
ProjectParams.ValidateAndLog: AdditionalCookerOptions=
ProjectParams.ValidateAndLog: DedicatedServer=True
ProjectParams.ValidateAndLog: DirectoriesToCook=
ProjectParams.ValidateAndLog: CulturesToCook=
ProjectParams.ValidateAndLog: EditorTargets=MGameEditor
ProjectParams.ValidateAndLog: Foreign=False
ProjectParams.ValidateAndLog: IsCodeBasedProject=True
ProjectParams.ValidateAndLog: IsProgramTarget=False
ProjectParams.ValidateAndLog: IterativeCooking=False
ProjectParams.ValidateAndLog: CookAll=False
ProjectParams.ValidateAndLog: CookMapsOnly=False
ProjectParams.ValidateAndLog: Deploy=False
ProjectParams.ValidateAndLog: IterativeDeploy=False
ProjectParams.ValidateAndLog: FastCook=False
ProjectParams.ValidateAndLog: LogWindow=False
ProjectParams.ValidateAndLog: Manifests=False
ProjectParams.ValidateAndLog: MapToRun=MainLevel+MainMenu+Transition
ProjectParams.ValidateAndLog: NoClient=False
ProjectParams.ValidateAndLog: NumClients=0
ProjectParams.ValidateAndLog: NoDebugInfo=False
ProjectParams.ValidateAndLog: NoCleanStage=False
ProjectParams.ValidateAndLog: NoXGE=False
ProjectParams.ValidateAndLog: MapsToCook=MainLevel+MainMenu+Transition
ProjectParams.ValidateAndLog: Pak=False
ProjectParams.ValidateAndLog: Package=False
ProjectParams.ValidateAndLog: NullRHI=False
ProjectParams.ValidateAndLog: FakeClient=False
ProjectParams.ValidateAndLog: EditorTest=False
ProjectParams.ValidateAndLog: RunAutomationTests=False
ProjectParams.ValidateAndLog: RunAutomationTest=
ProjectParams.ValidateAndLog: RunTimeoutSeconds=0
ProjectParams.ValidateAndLog: CrashIndex=0
ProjectParams.ValidateAndLog: ProgramTargets=
ProjectParams.ValidateAndLog: ProjectBinariesFolder=C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64
ProjectParams.ValidateAndLog: ProjectBinariesPath=C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64
ProjectParams.ValidateAndLog: ProjectGameExeFilename=C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\MGame.exe
ProjectParams.ValidateAndLog: ProjectGameExePath=C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\MGame.exe
ProjectParams.ValidateAndLog: Distribution=False
ProjectParams.ValidateAndLog: Prebuilt=False
ProjectParams.ValidateAndLog: Prereqs=False
ProjectParams.ValidateAndLog: NoBootstrapExe=False
ProjectParams.ValidateAndLog: RawProjectPath=C:\Users\Kilrath\Documents\Unreal Projects\MGame\MGame.uproject
ProjectParams.ValidateAndLog: Rocket=False
ProjectParams.ValidateAndLog: Run=False
ProjectParams.ValidateAndLog: ServerConfigsToBuild=Development
ProjectParams.ValidateAndLog: ServerCookedTargets=MGameServer
ProjectParams.ValidateAndLog: ServerTargetPlatform=Win64
ProjectParams.ValidateAndLog: ShortProjectName=MGame
ProjectParams.ValidateAndLog: SignedPak=False
ProjectParams.ValidateAndLog: SignPak=
ProjectParams.ValidateAndLog: SkipCook=False
ProjectParams.ValidateAndLog: SkipCookOnTheFly=False
ProjectParams.ValidateAndLog: SkipPak=False
ProjectParams.ValidateAndLog: SkipStage=False
ProjectParams.ValidateAndLog: Stage=False
ProjectParams.ValidateAndLog: bUsesSteam=True
ProjectParams.ValidateAndLog: bUsesCEF3=False
ProjectParams.ValidateAndLog: bUsesSlate=True
ProjectParams.ValidateAndLog: bDebugBuildsActuallyUseDebugCRT=False
ProjectParams.ValidateAndLog: Project Params **************
Project.Build: ********** BUILD COMMAND STARTED **********
UE4Build.Build: XGE was requested, but is unavailable, so we won’t use it.
UE4Build.Build: ************************* UE4Build:
UE4Build.Build: ************************* ForceMonolithic: False
UE4Build.Build: ************************* ForceNonUnity:False
UE4Build.Build: ************************* ForceDebugInfo: False
UE4Build.Build: ************************* UseXGE: False
UE4Build.Build: ************************* UseParallelExecutor: False
CommandUtils.Run: Run: K:\Development\UnrealEngine-4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe MGameEditor Win64 Development “C:\Users\Kilrath\Documents\Unreal Projects\MGame\MGame.uproject” -noxge -generatemanifest -NoHotReloadFromIDE
UnrealBuildTool: Performing full C++ include scan (building a new target)
CommandUtils.Run: Run: Took 2.7739098s to run UnrealBuildTool.exe, ExitCode=0
UE4Build.PrepareManifest: Copied UBT manifest to K:\Development\UnrealEngine-4.10\Engine\Programs\AutomationTool\Saved\Logs\UBTManifest.0.xml
CommandUtils.Run: Run: K:\Development\UnrealEngine-4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe MGameEditor Win64 Development “C:\Users\Kilrath\Documents\Unreal Projects\MGame\MGame.uproject” -noxge -NoHotReloadFromIDE -ignorejunk
UnrealBuildTool: Creating makefile for MGameEditor (UnrealBuildTool.exe is newer)
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Plugins\VaRestPlugin\Binaries\Win64\UE4Editor-VaRestPlugin-8683.dll”.
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Plugins\VaRestPlugin\Binaries\Win64\UE4Editor-VaRestPlugin-8683.pdb”.
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Plugins\VaRestPlugin\Binaries\Win64\UE4Editor-VaRestEditorPlugin-9159.dll”.
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Plugins\VaRestPlugin\Binaries\Win64\UE4Editor-VaRestEditorPlugin-9159.pdb”.
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2105.dll”.
UnrealBuildTool: Unable to delete old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2105.dll”. Error: C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2105.dll
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2147.dll”.
UnrealBuildTool: Unable to delete old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2147.dll”. Error: C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-2147.dll
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-673.dll”.
UnrealBuildTool: Unable to delete old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-673.dll”. Error: C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-673.dll
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-8301.dll”.
UnrealBuildTool: Unable to delete old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-8301.dll”. Error: C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-8301.dll
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-9159.dll”.
UnrealBuildTool: Unable to delete old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-9159.dll”. Error: C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-9159.dll
UnrealBuildTool: Deleting old hot reload file: “C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-9159.pdb”.
UnrealBuildTool: ERROR: System.UnauthorizedAccessException: Access to the path ‘C:\Users\Kilrath\Documents\Unreal Projects\MGame\Binaries\Win64\UE4Editor-MGame-9159.dll’ is denied.
UnrealBuildTool: at UnrealBuildTool.UEBuildTarget.CleanFile(String Filename) in k:\Development\UnrealEngine-4.10\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1061
UnrealBuildTool: at UnrealBuildTool.UEBuildTarget.CleanStaleModules() in k:\Development\UnrealEngine-4.10\Engine\Source\Programs\UnrealBuildTool\Configuration\UEBuildTarget.cs:line 1442
UnrealBuildTool: at UnrealBuildTool.UnrealBuildTool.RunUBT(String] Arguments) in k:\Development\UnrealEngine-4.10\Engine\Source\Programs\UnrealBuildTool\System\UnrealBuildTool.cs:line 1982
CommandUtils.Run: Run: Took 38.3933291s to run UnrealBuildTool.exe, ExitCode=5
BuildCommand.Execute: ERROR: BUILD FAILED
Program.Main: ERROR: AutomationTool terminated with exception:
Program.Main: ERROR: Exception in AutomationUtils.Automation: Command failed (Result:5): K:\Development\UnrealEngine-4.10\Engine\Binaries\DotNET\UnrealBuildTool.exe MGameEditor Win64 Development “C:\Users\Kilrath\Documents\Unreal Projects\MGame\MGame.uproject” -noxge -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.02.07-16.37.12.txt’
Stacktrace: at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\ProcessUtils.cs:line 800 at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\UBTUtils.cs:line 63
at AutomationTool.UE4Build.BuildWithUBT(String ProjectName, String TargetName, UnrealTargetPlatform TargetPlatform, String Config, String UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 345 at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\UE4Build.cs:line 1459 at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\Scripts\BuildProjectCommand.Automation.cs:line 114 at BuildCookRun.DoBuildCookRun(ProjectParams Params) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\Scripts\BuildCookRun.Automation.cs:line 209 at BuildCommand.Execute() in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\BuildCommand.cs:line 35 at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 395 at AutomationTool.Automation.Process(String] CommandLine) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\Automation.cs:line 369 at AutomationTool.Program.MainProc(Object Param) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\Program.cs:line 134 at AutomationTool.InternalUtils.RunSingleInstance(Action1 Main, Object Param) in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\AutomationUtils\Utils.cs:line 708
at AutomationTool.Program.Main() in K:\Development\UnrealEngine-4.10\Engine\Source\Programs\AutomationTool\Program.cs:line 53
ProcessManager.KillAll: Trying to kill 0 spawned processes.
Program.Main: AutomationTool exiting with ExitCode=5
Domain_ProcessExit
AutomationToolLauncher exiting with ExitCode=5
copying UAT log files…
RunUAT.bat ERROR: AutomationTool was unable to run successfully.
BUILD FAILED
[/SPOILER]

As soon as i include that file i get that failure in frontend where i build the dedicated server. i can build in VS and in UE4 no problem.

According to the log he tries to delete old hot reload files, and then failes. Try doing that for him by removing all .dlls in your Binaries/WinXX folder

the issue isnt the deletion of those file, if you look there is an access denied, if i cook without that include i still get those unable to delete errors but it still finishes and works, it only gets the access denied when include teh gameserver file.

Yep I saw this… Generally if something has access denied I try to run it as admin, but I doubt that this is the problem here… I found this:

from here. That makes sense, try compiling it without having the editor open…

i will try it tonight after work, thanks.

so strangely closing the editor allowed it to build. i never would of thought including steam_api.h would work but including steam_gameserver.h would require teh client to be closed. now for the next hurdle, lol.

so got it cooked and running but not doing what i expected :frowning:

back to teh drawing board to try to figure out the servers steam id… maybe the way it is starting up it just doesnt have one, i dont know, but without a valid player controller it cant seem to create a session… so im lost.

trying to work with InitSteamServer(uint32 unIP, uint16 usSteamPort, uint16 usGamePort, uint16 usQueryPort, EServerMode eServerMode, const char *pchVersionString) but having issues with documentation i guess. as well as the compiler telling my its incompatible with a bool…

so graduated to trying this:



bool UMyServerBlueprintLibrary::InitMySteamServer(int32 iSteamPort, int32 iGamePort, FString versionText) {

	const char * versionChar = TCHAR_TO_ANSI(*versionText);

	if (SteamAPI_Init()) {
		if (SteamGameServer_Init(0, iSteamPort, iGamePort, iSteamPort, eServerModeAuthenticationAndSecure, versionChar)) {
			return 1;
		}
	}

	return 0;
}

with blueprint setup:
716ad0ea1af1b6f69ffc6c2142b2d3089cf9cc81.png

and getting “Failed to INIT Server!” and unable to find an open port error now… so the function is failing for some reason, maybe i am just not supposed to call it at all…

Problems after Problems xD… “::bind couldn’t find an open port between 7023 and 7023”. This is the Steam port, so are you sure that the ports are open and allowed in the firewall / whatever system you use?
Edit: Are you still getting this Steam ID problem? Because it seems like the server is outputting the right Steam ID…

It’s giving me my steam Id but not it’s steam Id. And the port issue only shows an error if I try to in it the steam server. If I don’t use that function there is no error. So I’m thinking I’m trying to init it twice.

Maybe it inits the server automaticially so you won’t need custom code for that… And it’s steam id? I mean, I think the server has the steam ID of the guy who hosts the server, but if you run a server without steam open (which should be possible), how does he make up a steam id?

My server has steam open. Guess I just need to keep picking away at it… have to be close.