Unreal Header Tool fails for target - solution wont build for 'TwinShooterProjectEditor'

**Hello everyone,
I have encountered an error when following the tutorial to make Twin Shooter Project that I cant find a solution.
After following the instructions [on the video tutorial][1] I go into Visual Studio 2015 and try to compile the files but I get the two erors that I dont think is related to the code itself.

Severity Code Description Project File Line Suppression State
Error UnrealHeaderTool failed for target ‘TwinShooterProjectEditor’ (platform: Win64, module info: C:\Users\Joker\Desktop\Paulo Bazzo\Game Development\Unreal Engine\TwinStickShooter\TwinShooterProject\Intermediate\Build\Win64\TwinShooterProjectEditor\DebugGame\TwinShooterProjectEditor.uhtmanifest, exit code: OtherCompilationError (5)). TwinShooterProject C:\Users\Joker\Desktop\Paulo Bazzo\Game Development\Unreal Engine\TwinStickShooter\TwinShooterProject\Intermediate\ProjectFiles\EXEC 1

and also I get this other error

Severity Code Description Project File Line Suppression State
Error MSB3075 The command ““C:\Program Files\Epic Games\UE_4.18\Engine\Build\BatchFiles\Build.bat” TwinShooterProjectEditor Win64 DebugGame “C:\Users\Joker\Desktop\Paulo Bazzo\Game Development\Unreal Engine\TwinStickShooter\TwinShooterProject\TwinShooterProject.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. TwinShooterProject C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41

I wonder if anyone has come across this problem, I have tried reinstalling Visual Basic Studios 2015 with all the plugins, I have also installed Direct X Runtime but still not a success. I am running the VBS with administrators privilege but I still get the error.

Here are how my codes are looking.

Hero.h

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

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "Hero.generated.h"

UCLASS(Blueprintable)
class TWINSHOOTERPROJECT_API AHero : public ACharacter
{
	GENERATED_BODY()
	UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Hero")
		float Health = 100;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Hero")
		bool isDead = false;

	//Calculate death function (helper)
	virtual void CalculateDead();

	//Calculate health function
	UFUNCTION(BlueprintCallable, Category = "Hero")
		virtual void CalculateHealth(float delta);

#if WITH_EDITOR
	//Editor-centric code for changing properties
	virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
#endif


	public:
	// Sets default values for this character's properties
	AHero();

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

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	// Called to bind functionality to input
	virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

	
	
};

Hero.cpp

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

#include "Hero.h"


// Sets default values
AHero::AHero()
{
 	// 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 AHero::BeginPlay()
{
	Super::BeginPlay();
	
}

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

}

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

}

//Implement CalculateHealth

void AHero::CalculateHealth(float Delta)
{
	Health += Delta;
	CalculateDead();
}

//Implement CalculateDead
void AHero::CalculateDead()
{
	if (Health <= 0)
		isDead = true;
	else
		isDead = false;
}
//Implement PostEditChangedProperty
#if WITH_EDITOR
void AHero::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
	isDead = false;
	Health = 100;

	Super::PostEditChangeProperty(PropertyChangedEvent);

	CalculateDead();
}

#endif

I believe because something went wrong when building the solution I cannot open the project anymore and I receive a .DLL error and cannot open the TwinShooterProject.uproject. It asks me to rebuild but I then get those errors in Visual Basic Script and I don’t know what to do.

If anyone can give me an insight on this problem I would really appreciate, I am two days stuck on this and I dont know where to look anymore.

Thanks.

GENERATED_BODY() sets all members private, but UPROPERTY with BlueprintReadWrite or BluePrintReadOnly need to be public.

Try to change it like this:

GENERATED_BODY()

public:
         UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Hero")
             float Health = 100;

         UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Hero")
             bool isDead = false;

private:
...

Thank you so much for taking a look at my problem, it worked perfectly. :slight_smile:
The solution loaded and built without any errors.

Thank you again, God bless you.