C++ Coding Error (MSB3073)

Here are the relevent things in my constructor:

AbilitySystemComponent = CreateDefaultSubobject<UAbilitySystemComponent>(TEXT("AbilitySystemComponent"));
	AbilitySystemComponent->SetIsReplicated(true);
	AbilitySystemComponent->SetReplicationMode(EGameplayEffectReplicationMode::Full);

	Attributes = CreateDefaultSubobject<USnortAttributeSet>(TEXT("USnortAttributeSet"));

In my very short experience i’ve seen some very buggy behaviour of blueprints. I just tried changing the name in the CreateDefaultObject and my game started crashing so watch out with those names in the createdefault object function.

Is this where the error is at line 52?

No it must be somewhere higher above maybe even in your header.

I can’t find it in my ThirdPersonCharacter.h

Yeah that looks fine. Now that i’ve seen the project structure you can replace the hardcoded include path to

#include "../AttributesSet.h"

The top of your ThirdPersonCharacter.cpp must be generating an error likely one of your includes.

edit: it seems to add a . without special format

What do I replace it with #include “…/AttributesSet.h” ?

yea sorry without the tags it adds a . so

#include "../AttributesSet.h"

In AttributesSet.cpp you can use

#include "AttributesSet.h"

and from the thirdperson sources

#include "../AttributesSet"

the 2 dots mean the parent directory

Yes, I have the same thing so far, I’m just wondering why the system is not displayed in the engine

Yeah i dunno i solved problems like that by changing uproperties specifically VisibleAnywhere to EditAnywhere or changing the names completely of component variable and name passed to createdefaultsubobject etc.

i try i will feedback u

Okay I solved the problem now I had to recreate the ThirdPersonCharacter from the ThirdPersonCharacterClass

1 Like