Tutorials outdated?

I guess you are using the latest version of the engine, which would make FPostConstructInitializeProperties deprecated.
It’s FObjectInitializer now.

The following code should be working:



//MyGameMode.h
UCLASS()
class THIRDPERSONTUTORIAL_API AMyGameMode : public AGameMode
{
public:
	GENERATED_BODY()
	AMyGameMode(const class FObjectInitializer& PCIP);	
	virtual void StartPlay() override;
};




//MyGameMode.cpp
AMyGameMode::AMyGameMode(const class FObjectInitializer& PCIP) 
: Super(PCIP)
{

}

void AMyGameMode::StartPlay()
{
	Super::StartPlay();
	if (GEngine)
	{
		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("HELLO WORLD"));
	}
}