This lecture breaks my code :(

Hi all,

I am able to get up to the start of lecture 160 “A Better Component Architecture” with no problems. However, as soon as I make the forward declaration for UTankTrack in the TankMovementComponent.h file, my code no longer compiles. Additionally, a red error line appears under the #include for the generated header file, and under the word ‘class’ before the UTankMovementComponent class declaration:
Code%20Error%201

This is accompanied by error messages saying that “TankMovementComponent.generated.h” doesn’t exist.

Worse still, when I remove the line I can still no longer compile, and am instead flooded with many more errors:
Code%20Error%202

In fact, the only way to fix the issue is to completely restore to the previous working commit, immediately before this line was written.

Can anyone help to fix this issue? I have worked up to this lecture several times now, hoping that it would work this time, but I can only seem to irreparably break my code and have to hard reset. Note that my code and blueprint setup is identical to Ben’s in the lectures, apart from the additional #include’s due to the include what you use system.

Did you manage to fix it? I’m having the same problem now :slightly_frowning_face:.

EDIT:

Fixed it by removing “CoreMinimal.h” include from the file…

Usually when this type of thing happens to me I delete my Binaries and Intermediate folders, then regenerate the project files (right click on BattleTank.uproject -> Generate Visual Studio project files). Once you’ve regenerated the project files, open up the solution and try building the BattleTank project again.

1 Like

That’s the first thing I did but no Cigar. Deleting the CoreMinimal.h did it for me.

UPDATE: After a few hours of recovery it started working but I have no idea why (V4.18)
I recovered a backup of the project
copied and pasted exactly what Ben has for MovementComponent .h and .cpp
fixed header position
seemed to work again…

I couldn’t rebuild project files due to some other error and couldn’t open UE anymore due to build error

im completely stuck now with the same thing

deleting the coreminimal.h line did nothing

UE V4.18… Anyone else out there??

Privacy & Terms