So I’ve created a class ‘DLB_UsableActor’ and I get 2 errors, even tho the class is completelly untouched. What is going on? Any help would be appreaciated alot. Also I don’t know if this matter, But this class would be like a base for other pickups. Aka: PickupActor, WeaponPickup etc
Errors that I’m getting:
2>C:\Users\mcraf\Documents\Unreal Projects\DLB_Game\Source\DLB_Game\Items/DLB_UsableActor.h(10): error C2143: syntax error: missing ';' before '<class-head>'
2>C:\Users\mcraf\Documents\Unreal Projects\DLB_Game\Source\DLB_Game\Items/DLB_UsableActor.h(10): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
The class:
.h
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "DLB_UsableActor.generated.h"
UCLASS()
class DLB_GAME_API ADLB_UsableActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ADLB_UsableActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
.cpp
#include "DLB_UsableActor.h"
// Sets default values
ADLB_UsableActor::ADLB_UsableActor()
{
// Set this actor 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 ADLB_UsableActor::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ADLB_UsableActor::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}