``Im trying to follow the unreal engine FPS tutorial and I’m getting and error when trying to compile my code for the FPSGameMode.
‘AFPSProjectGameMode’: is not a class or namespace name
‘Super’: is not a class or namespace name
I copied the following code from the tutorial but it does not seem to be working.
// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "FPSProjectGameModeBase.generated.h"
/**
*
*/
UCLASS()
class FPSPROJECT_API AFPSProjectGameModeBase : public AGameModeBase
{
GENERATED_BODY()
virtual void StartPlay() override;
};
// Copyright Epic Games, Inc. All Rights Reserved.
#include "FPSProjectGameModeBase.h"
void AFPSProjectGameMode::StartPlay()
{
Super::StartPlay();
if (GEngine)
{
// Display a debug message for five seconds.
// The -1 "Key" value (first argument) indicates that we will never need to update or refresh this message.
GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Yellow, TEXT("Hello World, this is FPSGameMode!"));
}
}