When I launch my game it gives me an error message:
Here is what it says in Unreal:
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error: === Critical error: ===
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error:
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error: Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:Runtime\Core\Public\Containers/Array.h] [Line: 611]
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error: Array index out of bounds: 0 from an array of size 0
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error:
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error:
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error:
LogPlayLevel: Error: [2020.05.11-14.41.48:503][ 0]LogWindows: Error: end: stack for UAT
LogPlayLevel: Error: ERROR: Client exited with error code: 3
I have used the .txt trick to get the game to compile faster, but that may be causing this issue. I have no errors in my code.
Begin play looks like this:
void UBullCowCartridge::BeginPlay() // When the game starts
{
Super::BeginPlay();
const FString WordsPath = FPaths::ProjectContentDir() / TEXT("HiddenWordList.txt");
FFileHelper::LoadFileToStringArray(Words, *WordsPath);
Isograms = GetValidWords(Words);
SetupGame();
}
Other than an exit function, it is the exact same as the instructor’s code. The exit function is not causing the issue because I have commented it out to try it. I have also deleted my Binaries, Saved, and Intermediate and refreshed them.