Yes I included the baseclass in the header and I doublechecked the name.
Hi,
The BaseItem.h is in the same folder as the BaseWeapon.h ?
Hi, yes everything in the project is located inside the same folder.
I also made a new class deriving from a custom class (from inside the engine) and that one also got that same error. I’m not sure why new classes that derrive from custom classes now all of a sudden give me that error.
The classes has been created by the “Add new C++ class” in the editor or directly in Visual Studio ?
Also try removing “Intermediate” folder and “Binaries” folder and try again.
Deleting the intermediate & binary folders now changes the error to:
BaseWeapon.h(13) : ‘BaseWeapon’ can’t
be compiled: Parent class ‘BaseItem’
has errors.
Well, at least now it finds it’s baseclass. Sadly it does not say why the parent-class fails to compile (no other error messages).
But ABaseItem doesn’t have any errors… So I outcommented everything and changed it to:
#pragma once
#include "GameFramework/Actor.h"
#include "BaseItem.generated.h"
UCLASS()
class FPS2_API ABaseItem : public AActor
{
GENERATED_BODY()
};
But still the same error. It still complains that BaseItem has errors… But there are no other errors… So how can it have errors…
Also I noticed that pressing F12 when the cursor is on the parent-class “ABaseItem” it doesn’t work. For some reason Visual Studio does not recognize ABaseItem as the parentclass.
The problem was a circular dependency but for some reason Visual Studio did not throw that error.