This declaration has no storage class or type specifier

I’m trying to follow this voxel terrain tutorial series : https://garvinized.com/posts/2016/voxel-terrain-in-unreal-engine-4-part-1-getting-setup/

However, i’m with a big problem with c++ .

c++.PNG

If the UCLASS() is not exactly at line 8 i’ll get those 2 problems :
c++2.png

Thas means i can’t add any more includes before the UCLASS() or i’ll get compile erros.
I’ve already tried this solution, without sucess(it was the only one close to my problem that i could find) :

It’s important to notice that it has to be exactly at line 8.
That means if it’s at line 7th or less, 9th or more, it’ll still give me the problem.
Also, all types of lines count for the problem, comment lines and even blank lines count aswell.

I’m using unreal 4.15.

That’s just intellisense not understanding the macro, if you actually try compiling the code it will work fine.

The problem is that the UCLASS macro loads in some code from VoxelTerrainActor.generated.h based on it’s line number, so if you move it it can’t find that anymore.
Once you compile the code, the .generated.h will be recreated with correct line numbers, so it works again.

Ditch Intellisense, get Visual Assist X

VA also gets confused by these macros though, unless I missed a setting somewhere?
They’re all red until I click compile.

Ah that’s still Intellisense I think, I just switch intellisense off completely.

Mine just doesn’t compile at all, i am on the version 4.20. Is there any reason why?