Gamemode reference not working

I’m trying to create a reference to my gamemode (called TwinStickShooterCPPGameModeBase), but I’m getting a ton of errors that don’t make much sense.
The code I have looks like this:

UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Hero Character")
ATwinStickShooterCPPGameModeBase* GameMode;

It’s in my HeroCharacter class.

305858-gamemode-errors.png

These are only some of the errors because I’m getting so many.
Visual Studio doesn’t think anything is wrong, but obviously Unreal doesn’t like it. Any ideas or help is greatly appreciated!

That did the trick! Although, I could’ve sworn I already tried that…

Thank you so much!

It appears you did not add includes link to the ATwinStickShooterCPPGameModeBase.
Try changing the line to

 UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Hero Character")
 class ATwinStickShooterCPPGameModeBase* GameMode;

.

Could you please mark it as answered for tracking purposes.