DamageableActor is undefined error

Im a beginner in Unreal Engine 4 and I was trying to follow a tutorial (link: ) in 25:35 he included DamageableActor.h.

I included DamageableActor.h in my code it gives and identifier ADamageableActor is undefined error. I tried to compile but it wasn’t just a Visual Studio error. Here is my code:(Error is in 39th line)

#include “MyCharacterxd.h”
#include “DamageableActor.h”

AMyCharacterxd::AMyCharacterxd()
{
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = true;

}

// Called when the game starts or when spawned
void AMyCharacterxd::BeginPlay()
{
Super::BeginPlay();

}

// Called every frame
void AMyCharacterxd::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);

}

// Called to bind functionality to input
void AMyCharacterxd::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);

}

void AMyCharacterxd::fire_wep()
{
FHitResult hit = instantshot();
ADamageableActor* hitActor = Cast(hit.Actor);
if (hitActor && hitActor → attackable)
{
hitActor->takeAttack();
}

}

FHitResult AMyCharacterxd::instantshot() {
FVector loc;
FRotator rot;
FVector endTrace = FVector::ZeroVector;

APlayerController* const playercont = GetWorld()->GetFirstPlayerController();
if (playercont)
{
	playercont->GetPlayerViewPoint(loc, rot);
	endTrace = loc + (rot.Vector() * range);
}
FCollisionQueryParams traceParams(SCENE_QUERY_STAT(instantshot), true, GetInstigator());
FHitResult hit(ForceInit);

GetWorld()->LineTraceSingleByChannel(hit, loc, endTrace, ECC_Visibility, traceParams);

return hit;

}

Error Message from EU4 log: C:\Users\theaw\OneDrive\Belgeler\Unreal Projects\MyProject2\Source\MyProject2\MyCharacterxd.cpp(39) : error C2065: ‘ADamageableActor’: undeclared identifier

sorry about the markdown syntax could not understand anything

Hi! Can you add H and CPP source for ADamageableActor class too?

ok but i have to reinstall 4.26 files got corrupted :frowning:

ill try dont worry

it worked thanks a lot!