Error Unrecognized type

I am stuck here, please help.
The Error complains about it not being a UCLASS, but as far as I can see, it is. What am I missing?

Error message while trying to Compile in UE4.14:

Error D:/Games/GitHub/TankManiac/TankManiac/Source/TankManiac/Public/Tank.h(35) : Error: Unrecognized type ‘UTankMovementComponent’ - type must be a UCLASS, USTRUCT or UENUM

from Tank.h:

protected:
UTankAimingComponent* TankAimingComponent = nullptr;

UPROPERTY(BlueprintReadOnly)
UTankMovementComponent* TankMovementComponent = nullptr;

from TankMovementComponent.h:

UCLASS ( ClassGroup = (Custom), meta = (BlueprintSpawnableComponent) )
class TANKMANIAC_API UTankMovementComponent : public UNavMovementComponent
{
GENERATED_BODY()

public:
UFUNCTION(BlueprintCallable, Category = Setup)
void Initialise(UTankTrack* LeftTrackToSet, UTankTrack* RightTrackToSet);

UFUNCTION(BlueprintCallable, Category = Input)
void IntendMoveForward(float Throw);

private:
UTankTrack* LeftTrack = nullptr;
UTankTrack* RightTrack = nullptr;
};

FINALLY I figured it out, all I had to do to fix it was remove the space between “UCLASS” and “(”

Welcome to macros lol :joy:

Privacy & Terms