BullsandCows Video 53, Unreal crashing, can't play game

Hi,

So here is the bug log:

LoginId:6f2e0c5146282de316770781952b7b33
EpicAccountId:b49cbb50f35d4140a6372728db766267

Unhandled exception

UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_BullCowGame_4068!UBullCowCartridge::`vector deleting destructor’()
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_HotReload
UE4Editor_HotReload
UE4Editor_HotReload
UE4Editor_HotReload
UE4Editor_Core
UE4Editor
UE4Editor
UE4Editor
UE4Editor
UE4Editor
kernel32
ntdll

here is my BullCowCartridge.cpp

// Fill out your copyright notice in the Description page of Project Settings.
#include "BullCowCartridge.h"

void UBullCowCartridge::BeginPlay() // When the game starts
{
    Super::BeginPlay();
    PrintLine(TEXT("Bonjour! Bienvenue au jeu d'hétérogramme."));
    PrintLine(TEXT("Decouvrez le mot à 7 lettres!"));
    PrintLine(TEXT("Appuyez sur entrée pour continuer..."));
    HiddenWord = TEXT("isogram");
}

void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter
{
    ClearScreen();
    if (Input == HiddenWord)
    {
        PrintLine(TEXT("Vous avez raison!"));
    } else
    {
        PrintLine(TEXT("Réessayez!"));
    }
    
}

and here is the header:

// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "Console/Cartridge.h"
#include "BullCowCartridge.generated.h"

UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class BULLCOWGAME_API UBullCowCartridge : public UCartridge
{
	GENERATED_BODY()

	public:
	virtual void BeginPlay() override;
	virtual void OnInput(const FString& Input) override;

	// Your declarations go below!
	private:
	FString HiddenWord;
	
};

Before putting FString as a private variable, the game was working fine. Whats wrong?

I also tried putting it as a public variable and it doesnt the same thing. It seem the header is buggy!

Deleting binary and intermediate doesn’t help.

I was able to redo deleting Binary and Intermediate and it seems to work now. The sequence of doing is important I think. VSCode should be close as well and not open until everything is rebuilt.

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

Privacy & Terms