Download

Dedicated server shutdown. I'm desperated, shouln't be that dificult.

Well as the title says. I’m just trying to shutdown my server manually by creating a c++ blueprint function. I used FGenericPlatformMisc::RequestExit(true); and GIsRequestingExit = 1; with same results (nothing good).
Everytime I call that function in my GameMode when I check the server console there’s a warning wich means that nothing will be executed “LogScript:Warning: Accessed None”

I’m just struggling really hard in order to discover what the heck is going on, but I’m not seeing what’s wrong. I’ll post my code here so you’ll be able to tellme what’s wrong in it:



public:
		UFUNCTION(BlueprintCallable,Category="Test")
		static bool ShutdownServer(bool force);
	
};




bool UShutdownServer::ShutdownServer(bool force)
{
	if (force) {
		FGenericPlatformMisc::RequestExit(true);
	}
	else
		GIsRequestingExit = 1;
	return true;
}




Thank’s in advance.

Fixed! thank you for your help :wink:

Would you mind sharing us the solution? Someone might have the same problem :slight_smile:

I’ve just created a new clas for that logic, but I’ve got the d4mn error, then I’ve assumed that the problem whas about the owner hasn’t enough authority to execute that command.
Today I’ve just figured out, that moving all the logic into a c++ game mode. Reparent my current GM to the c++ one and then call this function from there.

It worked…

Greetings.

PS: Check our project at https://twitter.com/BloodAncestors Ty!