when I try compiling the code it’s give me an error as followed for the OpenDoor.h script :
Expected an include at the top of the header: ‘#include “OpenDoor.generated.h”’.
I did’t change anything and it look like the header file in the video
The Intellisense is showing this error, try these steps, so that Intellisense doesn’t throw you meaningless errors -
1 - Go to Unreal.
2 - Select File > Refresh VS Code.
If this doesn’t work, and you are on UE 4.25, try this link -
If you can’t compile, can you show me the errors? And the code?
I am using unreal 4.25 and I know about the red line problem but the code did compile until I added the opendoor
this is the cpp:
I have added the header witch unreal tells me is the problem and the only error is the one that I specified.
Can you remove the space after the GetOwner() and compile again?
And the rest of your code?
Can you share your whole code as @DanM said?
Can you add
#include "OpenDoor.generated.h" at the top of your .h file? Don’t know if this will work or not… But please try.
Look at the top of your header file.
it is there and I try deleting it and rewriting it but it didn’t work (I marked it at the first picture with my mouse).
Please see @DanM’s post.
I found the problem, thank you for all the help and sorry for the silly mistake
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.