Unknown error while following UE4 programming tutorial

Hello, so I am trying to follow along the UE4 programming tutorial videos and I’m only on the second video and already getting an error and I’m not sure why its an error.

I’m working on the pickup source file and I have exactly what the instructor has on her screen:

#include "TutorialCode.h"
#include "Pickup.h"

APickup::APickup(const class FPostConstructInitializeProperties& PCIP)
	: Super(PCIP)
	//the pickup is valid when it is created
	bIsActive = true;

	//Create the root SphereComponent to handle the pickup's collision
	BaseCollisionComponent = PCIP.CreateDefaultSubobject<USphereComponent>(this, TEXT("BaseSphereComponent"));

	//Set the SphereComponent as the root component
	RootComponent = BaseCollisionComponent;

	//Create the static mesh component
	PickupMesh = PCIP.CreateDefaultSubobject<UStaticMeshComponent>(this, TEXT("PickupMesh"));

	//Turn physics on for the static mesh

	//Attach the StaticMeshComponent to the root component

//Must add _Implementation if the function is a blueprint native event
void APickup::OnPickedUp_Implementation()
	//There is no default behavior for a Pickup when it is picked up.

Except I am getting an error that says:

1>D:\UnrealProjects\TutorialCode\Source\TutorialCode\Pickup.cpp(21): error C2065: ‘PickupMesh’ : undeclared identifier

Any idea why this is happening?

Edit: the error is actually on line 19 above

Check your Pickup.h file contains this:

	/** StaticMeshComponent to represent the pick-up in the level */
	UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category = Pickup)
	TSubobjectPtr<UStaticMeshComponent> PickupMesh;

(Copied from working source, I did the tutorial too earlier )

Yup this seems to have been the issue, don’t know how I missed that. Thanks for the help!

You’re welcome :smiley: