Hello,
In my project, i cannot create a simple ustruct even if I copy/paste an existing and functional struct from an other file: it always fails to build. More precisely, the “GENERATED_USTRUCT_BODY” is always underlined with the error message “this declaration has no storage class or type specifier”. And the first thing after that is marked as “expected ;”
Here is the code of my header (but this problem occurs everywhere) :
#pragma once
#include "GameFramework/PawnMovementComponent.h"
#include "MyMovementComponent.generated.h"
USTRUCT()
struct MyStruct
{
GENERATED_USTRUCT_BODY()// underlined with "this declaration has no storage class or type specifier"
UPROPERTY()
float f; // f is marked with "expected ;"
MyStruct(){
};
};
UCLASS()
class PROTOGAMEPLAY_API UMyMovementComponent : public UPawnMovementComponent
{
GENERATED_UCLASS_BODY()
};
As you can see, i have not forget the .generated.h, so i don’t understand from where this error comes.
To finish, i work with UE 4.5.
Thank you in advance.