lll2Blll
(lll2Blll)
1
I type this few lines of code in my header file, nothing else, but it keep getting error. help please.
#pragma once
#include "Kismet/BlueprintFunctionLibrary.h"
#include "BP_FLib_CharacterStructure.generated.h"
USTRUCT(BlueprintType)
struct CharacterStatusStructure
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
int32 CharacterMaxHealth;
};
Hennez
(Hennez)
2
Hi Jason,
What is the error you’re getting? Can you copy paste the compiler output?
lll2Blll
(lll2Blll)
4
This is the error I am getting.
lll2Blll
(lll2Blll)
6
This is the error I am getting.
Hennez
(Hennez)
7
Change your struct name to FCharacterStatusStructure
So it should be:
USTRUCT(BlueprintType)
struct FCharacterStatusStructure
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
int32 CharacterMaxHealth;
};
And that should work. I actually thought the ‘F’ prefix for structs was just best practice, but it looks like it’s enforced.
lll2Blll
(lll2Blll)
8
wow. It solved the problem. thank you for your quick help. I’ve been scratching out my head all afternoon. XDD
Love your guys.
Hennez
(Hennez)
9
No worries, glad to help! Go ahead and mark my response as the answer so other people with the same issue can find it quickly.