I’ve been stuck a few days on this: I created the new class through the editor and without adding any new code, I get the following error:
1>[1/5] Compile [x64] TTBTask_RangedAttack.gen.cpp
1>C:\Dev\UE_5.3\Engine\Source\Runtime\AIModule\Classes\BehaviorTree\Blackboard\BlackboardKey.h(7): error C2143: syntax error: missing ';' before 'namespace'
1>C:\Dev\UE_5.3\Engine\Source\Runtime\AIModule\Classes\BehaviorTree\Blackboard\BlackboardKey.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>[2/5] Compile [x64] TTBTask_RangedAttack.cpp
1>C:\Dev\UE_5.3\Engine\Source\Runtime\AIModule\Classes\BehaviorTree\Blackboard\BlackboardKey.h(7): error C2143: syntax error: missing ';' before 'namespace'
1>C:\Dev\UE_5.3\Engine\Source\Runtime\AIModule\Classes\BehaviorTree\Blackboard\BlackboardKey.h(7): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>Total time in Parallel executor: 2.40 seconds
The class header
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "BehaviorTree/BTTaskNode.h"
#include "TTBTask_RangedAttack.generated.h"
/**
*
*/
UCLASS()
class TTPROJ_API UTTBTask_RangedAttack : public UBTTaskNode
{
GENERATED_BODY()
};
the source file
// Fill out your copyright notice in the Description page of Project Settings.
#include "AI/TTBTask_RangedAttack.h"
As a note, I’ve already done my own Behaviour Tree service and it compiles/links fine.
Thanks in advance !