UPROPERTY Causing Compile Error

Hi.
New to Unreal, learning as I go so this may be something simple.
I’ve created two classes, and from those, two BLUEPRINTS. One of the classes is going to spawn the other one (that’s the plan anyway). All the code seems OK and when I run it, the console tells me that the spawn FAILED because no class was specified. A quick Google search and I find that I need to specify which class I want to spawn in the BP of the spawning object. Simple enough I thought, I’ll create a UPROPERTY with a catagory and I’ll set it from there, as others were show to do in the help I found.
My problem is, everytime I add this line, I get the following compile error.

Error 1 error code:
OtherCompilationError (5)
C:\Users\Documents\Unreal
Projects\Practice\Intermediate\ProjectFiles\Error
Practice

As I said, both classes have BP’s attached (I right-clicked the class in the editor and selected create Blueprint from the options).
Here’s the UPROPERTY line in question.

UPROPERTY(EditAnywhere, Catagory=DefaultClasses)
TSubclassOf<class AMyCube> MyCubeClass;

I’ve noticed that when I’m typing the UPROPERTY statement, Intellisense is giving me options to fill in. When I see people typing it out on YT, this doesn’t happen. Not sure if that means any thing. When I hover over the UPROPERTY function in VS (I’m using 2013 community btw) it says

These Macros wrap metadata around
parsed by the Unreal header tool …
etc.

Is that right?

Any help appreciated.

Hi,

That error is just UnrealBuildTool saying that ‘UnrealHeaderTool failed’. There should be an earlier error from UnrealHeaderTool itself, which points to your actual property line and is more informative.

Though at a guess, you’ve spelt ‘Category’ wrongly.

Steve

You were right, it was a simple mistake of spelling Category wrong. It was staring me in the face all this time. Thanks for the help, much appreciated. :slight_smile:

Hey there, i just noticed that you posted the question twice:

I will post this one into the other question and lock it (: