FTimline Not Compiling

I have used Blueprints to make Timelines before and am now trying to figure out how to use them in C++. This particular instance is to build in the swing of a door.

In trying to learn how to use FTimelines I have referred to the following post:

But in my case I get a compile error that doesn’t make a whole lot of sense to me. Below is the code I use:

.h (including the statement before to show that I close it)

// Sets default values for this actor's properties
	AElevator(const FObjectInitializer& ObjectInitializer);

	FTimeline DoorTimeline;
	UFUNCTION()
		void UpdateDoorPlacement(float Value);

.cpp (nothing important here yet, but have the function in place so it compiles)

void AElevator::UpdateDoorPlacement(float Value)
{
       //yada-yada....
}

The error I get is the following:

Error 1 error C2146: syntax error : missing ‘;’ before identifier ‘DoorTimeline’

This make sense to anyone?

Just need a little correction at this line:
class FTimeline DoorTimeLine;
For parser it means that it is actually class, if there’s no “class” or “struct” keywords, so this is common type (float, int, char etc.).
.h don’t have header included for FTimeline, so it knows that it is a type (UnrealParser knows), but don’t know what behind this type.
And don’t forget to include header for FTimeline in .cpp (not in .h), this will be something like “GameFramework/Timeline.h”.

That was the trick! Thanks a million

Visual Studio was doing the appropriate coloring so I didn’t think I needed to make any other explicit includes. But seems like I have a lot to learn :smiley:

For anyone learning from this:
#include “Runtime/Engine/Classes/Components/TimelineComponent.h”