BuildingEscape Keeps Crashing

Hello everyone,
I am having a bit of a problem with Unreal. I went a bit ahead of the lecture and figured out what code I needed to get the DefaultPlayerPawn. I then set this to my ActorThatOpensDoor but instead of setting this in the BeginPlay function like Mike did, I first set it in the header file. When I tried to compile, Unreal crashed with this error.

Then I moved it into the BeginPlay function after watching the rest of the lecture and I tried to open up Unreal again. But it would not open and it came back with the same error as before. My code is the exact same as Mike’s and I cannot figure out what is wrong.

Here is my cpp:


and here is my header file:

Thanks!

You would need to compile after making that change. You can do that via VS Code by doing

Ctrl + Shift + B > ProjectNameEditor Platform Development Build

Platform being the platform you are targeting e.g. Win64

Hi Dan,
Sorry for getting back to you so late. Thank you so much for the help, that worked!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms