Hi guys just working on my college project which is a shooter so have been following the twin stick shooter tutorial on the unreal YouTube channel did some of the c++ coding but no errors in the actual code but when i get to the build of the code it get this error: 2 error MSB3073: The command ““C:\Program Files (x86)\Epic Games\4.9\Engine\Build\BatchFiles\Build.bat” ConceptsEditor Win64 Development “E:\FMP\progress\Concepts\Concepts.uproject” -rocket -waitmutex” exited with code -1. C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets 38 5 Concepts*
Any help fixing this issue would be greatly appreciated quite new to c++ coding so havent an idea of how to fix and have a short time frame for the work.
Thanks
// Fill out your copyright notice in the Description page of Project Settings.
#include "Concepts.h"
#include "MyCharacter.h"
// Sets default values
AMyCharacter::AMyCharacter()
{
// 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 AMyCharacter::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void AMyCharacter::Tick( float DeltaTime )
{
Super::Tick( DeltaTime );
}
// Called to bind functionality to input
void AMyCharacter::SetupPlayerInputComponent(class UInputComponent* InputComponent)
{
Super::SetupPlayerInputComponent(InputComponent);
}
//implement CalculateHealth
void AMyCharacter::CalculateHealth(float delta)
{
Health += delta;
CalculateDead();
}
//implement CalculateDead
void AMyCharacter::CalculateDead()
{
if (Health <= 0)
isDead = true;
else
isDead = false;
}
//implement PostEditChangeProperty
#if WITH_EDITOR
void AMyCharacter::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{
isDead = false;
Health = 100;
Super::PostEditChangeProperty(PropertyChangedEvent);
CalculateDead();
}
#endif
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "GameFramework/Character.h"
#include "MyCharacter.generated.h"
UCLASS(Blueprintable)
class CONCEPTS_API AMyCharacter : public ACharacter
{
GENERATED_BODY()
public:
//make a health property
UPROPERTY(BlueprintReadWrite, Edit Anywhere, Catergory = "My Character")
float Health = 100;
//make a isDead property
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Catergory = "My Character")
bool isDead = false;
//calculate death function (helper)
virtual void CalculateDead();
//calculate health function
UFUNCTION(BlueprintCallable, Catergory = "My Character")
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
AMyCharacter();
// Called when the game starts or when spawned
virtual void BeginPlay() override;
// Called every frame
virtual void Tick( float DeltaSeconds ) override;
// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
};
Hey -
Can you post a screenshot of the full output window and error list window? The error you posted just says that there was an error during compile but doesn’t point to where the error is.
In the error list window (first screenshot), the actual error is the “OtherCompilationError(5)”. If you find the same line in the output window (second screenshot - second line) and look at the line just above, it shows that “Category” was misspelled in your header file.
Cheers
yeah just taking a screenshot
alt text
thanks very much seems to have worked no more errors now feel really dumb for such a small mistake thanks for noticing and helping me.