Hi, I am using paid version of GPT to help me set up GAS.
I am going line by line so I can learn what is happening.
everything was fine until we included accessors for Health and MaxHealth.
I get compile errors with those lines and GPT is saying GameplayAttribute.h is missing from the includes.
That file does not exist in the plugin source files. I validated through the launcher and it never showed up. It is insisting that the file should be there and wants me to find it on the web and add it manually.
I think its off its rocker but I wanted to reach out and see if Epic made any changes that would effect this? or if anyone can help in any direction.
I downloaded all the latest documentation and fed it those before I started.
I also found an example project online and gave it the customAttributeSet.h for it to look at. That file used accessors and did NOT include GameplayAttribute.h but GPT gave some excuse and still wants the file in the plugin source directory. Thanks for reading.
Update:
I finally got it to accept the file is not supposed to be there and told me to do this as a patch.
which works. This is consistent to what I’ve seen in other files and does compile. As far as I can tell this is not a “Patch” as GPT suggests but the intended use of the macros.
Could we please see the code and the errors? Can’t help much with the current explanation since all you’ve given us are possibly (probably) imaginary source names.
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
include “CoreMinimal.h” include “AttributeSet.h” include “AbilitySystemComponent.h”
//include “GameplayAttribute.h” // ? THIS IS MANDATORY include “GameplayEffectTypes.h” include “Net/UnrealNetwork.h”
Edited my previous reply but I’ll repost here, check this snippet from AttributeSet.h which explains what you need to do (which gpt seemingly also figured out in the end):
Thank you for that. Yes that is exactly what the issue was. @Kemichar You work faster than GPT 4o lol.
I opened the AttributeSet trying to find an include but never bothered to read any of that.
Thank you.
Maybe this will help someone else in the future.
Trying to learn c++ on the fly while also learning GAS for the first time is a little bumpy.