GENERATED_BODY() and "exited error code 5" does not let me compile!

I’m trying to make my code compile, but I can’t past this. :frowning:
I’m using Unreal 4.19.

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include “CoreMinimal.h”
#include “Components/ActorComponent.h”
#include “Engine/TriggerVolume.h”
#include “OpenDoor.generated.h”

UCLASS( ClassGroup = (Custom), meta = (BlueprintSpawnableComponent) )
class BUILDINGSCAPE_API UOpenDoor : public UActorComponent
{
GENERATED_BODY()

public:
// Sets default values for this component’s properties
UOpenDoor();

protected:
// Called when the game starts
virtual void BeginPlay() override;

public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

private:
UPROPERTY(VisibleAnywhere)
float OpenAngle = 90.f;

UPROPERTY(EditAnyware)
ATriggerVolume* PressurePlate;
};

When you get the error, at the bottom you have multiple tab. Instead of the “Error List” tab, can you post the “Output” tab content with you’re code please? It contains clearer instruction on what went wrong.

Also, when you post code, try to use the “</>” text formatting so it’s more visible. Like this:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include “CoreMinimal.h”
#include “Components/ActorComponent.h”
#include “Engine/TriggerVolume.h”
#include “OpenDoor.generated.h”

UCLASS( ClassGroup = (Custom), meta = (BlueprintSpawnableComponent) )
class BUILDINGSCAPE_API UOpenDoor : public UActorComponent
{
GENERATED_BODY()

public:	
// Sets default values for this component’s properties
UOpenDoor();

protected:
// Called when the game starts
virtual void BeginPlay() override;

public:	
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

private:
UPROPERTY(VisibleAnywhere)
float OpenAngle = 90.f;

UPROPERTY(EditAnyware)
ATriggerVolume* PressurePlate;
};
1 Like

Thanks for the reply!
Here is my output:

1>  Running UnrealHeaderTool "C:\Users\neofa\OneDrive\Documents\repos\03_BuildingScape\BuildingScape\BuildingScape.uproject" "C:\Users\neofa\OneDrive\Documents\repos\03_BuildingScape\BuildingScape\Intermediate\Build\Win64\BuildingScapeEditor\Development\BuildingScapeEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
1>C:/Users/neofa/OneDrive/Documents/repos/03_BuildingScape/BuildingScape/Source/BuildingScape/OpenDoor.h(32) : LogCompile: Error: Unknown variable specifier 'EditAnyware'
1>EXEC : error : UnrealHeaderTool failed for target 'BuildingScapeEditor' (platform: Win64, module info: C:\Users\neofa\OneDrive\Documents\repos\03_BuildingScape\BuildingScape\Intermediate\Build\Win64\BuildingScapeEditor\Development\BuildingScapeEditor.uhtmanifest, exit code: OtherCompilationError (5)).
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ""C:\Program Files (x86)\Epic Games\Launcher\UE_4.19\Engine\Build\BatchFiles\Build.bat" BuildingScapeEditor Win64 Development "C:\Users\neofa\OneDrive\Documents\repos\03_BuildingScape\BuildingScape\BuildingScape.uproject" -WaitMutex -FromMsBuild" exited with code 5. Please verify that you have sufficient rights to run this command.
1>Done building project "BuildingScape.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1 Like

Here we go, you have a typo :slight_smile:

Unknown variable specifier 'EditAnyware' 

in OpenDoor.h line 32

Hope it fixes it!

2 Likes

Thanks so much @carl-boisvert.
I can’t believe I missed such a stupid error. :slight_smile:

Privacy & Terms