Red error lines after creating Mover Actor

So I’m following along with the lectures and hit this hard stop problem on Unreal Enginge 5 C++ Developer: Learn C++ & Make Video Games
79. C++ Actor Component

Upon creating the Actor class Mover following the videos instructions, I am stuck with these red lines underneath the include parts for the header file.

image

But also upon running the code as instructed, I get Build Failed

And because the build fails I can’t see the actor be created to add it to the wall as instructed. And no error codes to look up and try to figure this out further. I could really use anyone’s help!!

Thank you in advance!

This looks like the live coding issue as mentioned in a video earlier in the course. Try closing the Editor, delete the intermediate and Binaries folders and launch the project again. This should correct the issue.

If it doesn’t Compile after this, it probably means you have an error in the source somewhere of your project.

After deleting those files, it now asks upon launching to rebuild the project. Clicking yes then comes back with CryptRaider could not be compiled. Try rebuilding from source manually.

Both when I try to launch via the project file and from launching unreal engine and open the project from there results in the same error.

After digging through the logs I am seeing error C2248 ‘FHazardPointerCollection::FHazardRecord::FHazardRecord’: cannot access private member declared in class ‘FHazardPointerCollection::FHazardRecord’

and I am just not sure what I am supposed to do to fix this problem, nor can I find the file this is trying to point to C:\Program Files\Epic Games\UE_5.3\Engine\Source\predefined C++ types (compiler internal)(420):

The actual error is misleading. It usually is a mistake in your code and not with the engine. You can try a development build in the code editor.

If you upload here https://gdev.tv/projectupload then I will try take a look at it this weekend. Make sure you zip the entire folder - see the instructions on the page.

Awesome, thank you so much for the help! I just submitted everything now!

1 Like

Ok, It is a really minor issue, probably accidental as well.
Mover.cpp, you inserted a space into the function name being passed in. This prevented a proper build from being performed. I changed this and it compiled just fine.

Oh my gosh, I feel so silly for not seeing that sooner.

I’ve gone back and fixed that issue but the same error remains for me however. Launching the file from the folder directly asks to rebuild the project, disappears for several seconds, and then returns with the error CryptRaider could not be compiled. Try rebuilding from source manually. Same thing when I try to do it through Unreal Engine (although that’s what I expected when trying to do it through the client.) What should I try now?

And thank you for the help!

I actually didn’t have that issue. It launched just fine but I did build from my code editor first then launched the project after regenerating the visual studio files (right click on the uproject in explorer)

Try that once you fix the code the red squiggles are not going to stop it building and refreshing the project again from the Unreal Editor may work too.

So regenerated the VS files like you said, then trying to open the project results in the same problem. Asks to rebuild upon opening the project, clicked okay, then after a few seconds it says “could not be compiled. Try rebuilding from source manually.”

Any ideas on what to try next?

The next step is to build in the code editor. This should work unless you have a mistake in your code. Give that a try now.

Well what do I do if the code editor doesn’t recognize a command like the CryptRaiderEditor Win64 Development Build? I open it up in VSCode and it doesn’t recognize any build tasks to run.

Thank you again for all this help also!

That I am not sure of as I personally don’t use vs code. There is however an option to right click on the uproject that says generate visual studio files. Give that a try and see if the build option appears.

So I tried that before but just gave it a shot again. Everything was closed and rebuilt it as you said, VSCode still doesn’t have any build commands/tasks so I just don’t know how to add commanding in build to select the right thing. There’s nothing I can scroll down and select like before.

Can you try using visual studio community to do a build?

Privacy & Terms