Error when building UPROPERTY

I set up two classes. One is a subclass of a player controller. The other is a subclass of a pawn. In my pawn class I try to set up a pointer to that my player controller like so:

UCLASS()
class ARJTestPawn : public APawn
{
GENERATED_UCLASS_BODY()

    //I get compiler error saying : "PlayerController is not a member of ARJTestPawn"
UPROPERTY(EditAnywhere, Category=playerController)
ARJPlayerController *playerController;

};

And here’s the header for my player controller

UCLASS()
class ARJPlayerController : public APlayerController
{
GENERATED_UCLASS_BODY()

};

Can any one help a beginner out?

Also here’s other errors I see:

‘UObjectProperty::UObjectProperty’ : no overloaded function takes 4 arguments

It’s a capitalization issue. If you search around I’m sure you’ll find a few other posts about it, but basically FNames are case insensitive, but the first one found sets the capitalization fr the rest of the places you use it. change your variable name to PlayerController and you should be good.

That worked, thank you very much!

We’ve made a change for 4.5 which will make FName case-preserving for the editor and UHT. This should address the FName case issues you’ve been seeing.

I’ve checked that you’re able to rename asset, actor, and blueprint components in a way that changes only their case. I’ve also tested that you’re able to have a variables in different UObject/UStruct types that vary only by case, and that the UHT will generate code that actually compiles.

It may have been changed in 4.5 for this specific case. However, UPROPERTY is still case insensitive in 4.18 for this case:

In base class:

UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "BaseStructure")
FText Name;

Function in the child-class derived from BaseStructure:

UFUNCTION(BlueprintCallable, Category = "Room")
void Foo(const FString name); // <<< error here.

error : Function parameter: ‘name’ cannot be defined in ‘Foo’ as it is already defined in scope ‘BaseStructure’ (shadowing is not allowed)

Quite silly and counter-intuitive for C++ code but I understand that this was probably done for Blueprints.