Issues with #include with BullCowGame

#include “BullCowCartridge.h” is underlined in red.

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

void UBullCowCartridge::BeginPlay() // When the game starts
{
    Super::BeginPlay();
    
}

void UBullCowCartridge::OnInput(const FString& Input) // When the player hits enter
{

}

#include “Console/Cartridge.h”
#include “BullCowCartridge.generated.h”
are underlined in red

// 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:
	
};

I’ve tried to delete some files as suggested is some posts to fix those issues but didn’t work. I had an error message with .net SDK i installed it again as asked by Visual Studio Code but the problem is still here. I’ve also done the 4.25 VSCode intellisense bug fix.

What message do you get for the underline?

Hello,

Thank you for your answer, sorry for the late answer. This is the error message i get : “#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (E:\UE projects\BullCowGame-starter-kit\Source\BullCowGame\BullCowCartridge.cpp).C/C++(1696)
cannot open source file “Cartridge.generated.h” (dependency of “BullCowCartridge.h”)C/C++(1696)”.

The programm works and i can run it in unreal engine, but i don’t know if this will bother me at some point in the course.

In the c_cpp_properties look for includePath and add

"${workspaceFolder}/**"

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

Privacy & Terms