Howdy all,
I am trying to create a struct which is used by a few of my classes.
Below is the entire ARGPlayerBaseAttributes.h file
I have the following code and am getting the following error:
#pragma once
USTRUCT()
struct FARGPlayerBaseAttributes
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
float Strength;
UPROPERTY()
float Dexterity;
UPROPERTY()
float Inteligence;
UPROPERTY()
float Charisma;
UPROPERTY()
float Wisdom;
UPROPERTY()
float Constitution;
//Set
void SetStrength(const float NewValue)
{
Strength = NewValue;
}
void SetDexterity(const float NewValue)
{
Dexterity = NewValue;
}
void SetInteligence(const float NewValue)
{
Inteligence = NewValue;
}
void SetCharisma(const float NewValue)
{
Charisma = NewValue;
}
void SetWisdom(const float NewValue)
{
Wisdom = NewValue;
}
void SetConstitution(const float NewValue)
{
Constitution = NewValue;
}
FARGPlayerBaseAttributes()
{
Strength = 0.0f;
Dexterity = 0.0f;
Inteligence = 0.0f;
Charisma = 0.0f;
Wisdom = 0.0f;
Constitution = 0.0f;
}
};
Error: ARGPlayerBaseAttributes.h(9): error C2144: syntax error : ‘float’ should be preceded by ‘;’
Error: ARGPlayerBaseAttributes.h(9): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Am I doing something very n00bish?
Cheers