I did check for
if(GEngine)
GEngine->AddOnScreenDebugMessage();
I think the issue is trying to find the name of AActor by using:
UGameplayStatics::GetPlayerCharacter(GetWorld(), 0))->GetName().
It crashes on this line. I am attaching the other things as a .txt file.link text
I saved it as a .txt file.