"const" is not an allowed type name when making a constructor anymore?

At first I thought I made a typo, but I haven’t. The code worked just fine not too long ago, and it feels like this problem shouldn’t to be this difficult at all.

Header:
UCLASS()
class MYPROJECT_API AFPSGameMode : public AGameMode
{
GENERATED_BODY()

		virtual void StartPlay() override;
		AFPSGameMode(const FObjectInitializer& ObjectInitializer);

};

CPP:

    void AFPSGameMode::StartPlay()
    {
    	Super::StartPlay();
    
    	StartMatch();
    
    	AFPSGameMode::AFPSGameMode(const FObjectInitializer& ObjectInitializer)
    		: Super(ObjectInitializer)
    	{
    		DefaultPawnClass = AFPSCharacter::StaticClass();
    	}
    
    	if (GEngine)
    	{
    		GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Yellow, TEXT("Hello World!"));
    	}
    }

the full error list is:

    type name not allowed, line 13
    identifier "object initializer" is undefined, line 13
    expected a ';', line 14

This has to be a joke right ? You are implementing your class constructor inside your class StartPlay function wtf?

oh, you’re right, what was i thinking hahaha

yeah, it’s fixed now. thanks

Everything looks clearer after some good night sleep right? :smiley: