When I compile my program I get some errors I’m having trouble fixing.
Lemme know what other information you might need and thanks in advance, I’ve been stuck on this for a while.
When I compile my program I get some errors I’m having trouble fixing.
Lemme know what other information you might need and thanks in advance, I’ve been stuck on this for a while.
Not all the images are being displayed, sorry about that; you can just click on the file names at the bottom of the question (e.g. “error-log.png”) to display the images.
error-log.png shows that there is a circular dependency in your project related to InventoryComponent.h. This means that some file includes InventoryComponent.h and that file in turn includes InventoryComponent.h. First try to find that file and remove the circular dependency and see if that resolves the errors.
Thank you for the answer and timely response.
A general advice, Don’t include header files directly into your headers if you are not allocating memory to the object, like if you are creating pointers. E.g. In your player class, you are creating pointer to UInventoryComponent but not allocating memory to it. So, instead of including InventoryComponent.h directly in your header, use a forward declaration and include the InventoryComponent.h in your .cpp file. That way these kind of errors can be avoided, plus it also reduces compilation dependencies.