I’m following a Packt tutorial regarding CSV table entry. The tutorial requires that I a) create a new Actor class, b) name it TestCustomData, and c) replace the contents of the newly-generated TestCustomData.h with the following code:
#pragma once
#include "TestCustomData.generated.h"
USTRUCT(BlueprintType)
struct FTestCustomData : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
UPROPERTY( BlueprintReadOnly, Category = "TestCustomData" )
int32 SomeNumber;
UPROPERTY( BlueprintReadOnly, Category = "TestCustomData" )
FString SomeString;
};
However, the TestCustomData file fails to compile, outputting the following log:
Error f:\unreal\ue4 assignments\ue4_projectrpg\source\ue4_projectrpg\TestCustomData.h(5) : error C2504: 'FTableRowBase': base class undefined
Info Compiling game modules for hot reload
Info Parsing headers for UE4_ProjectRPGEditor
Info Running UnrealHeaderTool "F:\Unreal\UE4 Assignments\UE4_ProjectRPG\UE4_ProjectRPG.uproject" "F:\Unreal\UE4 Assignments\UE4_ProjectRPG\Intermediate\Build\Win64\UE4_ProjectRPGEditor\Development\UE4_ProjectRPGEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Info Reflection code generated for UE4_ProjectRPGEditor in 3.4146568 seconds
Info Performing 4 actions (4 in parallel)
Info TestCustomData.cpp
Info UE4_ProjectRPG.generated.cpp
Error f:\unreal\ue4 assignments\ue4_projectrpg\source\ue4_projectrpg\TestCustomData.h(6) : error C3646: 'Super': unknown override specifier
Error f:\unreal\ue4 assignments\ue4_projectrpg\source\ue4_projectrpg\TestCustomData.h(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Error F:\Unreal\UE4 Assignments\UE4_ProjectRPG\Source\UE4_ProjectRPG\TestCustomData.h(5) : error C2504: 'FTableRowBase': base class undefined
Error F:\Unreal\UE4 Assignments\UE4_ProjectRPG\Source\UE4_ProjectRPG\TestCustomData.h(6) : error C3646: 'Super': unknown override specifier
Error F:\Unreal\UE4 Assignments\UE4_ProjectRPG\Source\UE4_ProjectRPG\TestCustomData.h(6) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Info ERROR: UBT ERROR: Failed to produce item: F:\Unreal\UE4 Assignments\UE4_ProjectRPG\Binaries\Win64\UE4Editor-UE4_ProjectRPG-3031.dll
Info Total build time: 6.88 seconds (Local executor: 0.00 seconds)
I’m fairly new to C++ in UE4, and any help would be appreciated. Thanks in advance for your help.