Getting multiple errors creating a simple script

I recently started learning UE5, im following a tutorial and i have been getting errors non stop and i dont really understand why.
I created the AARollaBallPlayer script i fixed the folder creation error, but now that i have written the code i get more errors, can some one explain what im doing wrong cause working with UE5 so far has not been the best experience so far…
Edit: im using visual studio 2022.
Video

Errors:
identifier IImageWrapperModule is undefined
incomplete type is not allowed

ARollaBallPlayer.h:------------------------------------------------------------------------------------
#pragma once

#include “CoreMinimal.h”
#include “GameFramework/Pawn.h”
#include “ARollaBallPlayer.generated.h”

class USpringArmComponent;
class UCameraComponent;

UCLASS()
class TEST_API AARollaBallPlayer : public APawn
{
GENERATED_BODY()

public:
// Sets default values for this pawn’s properties
AARollaBallPlayer();

protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;

//Definte Components
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
	UStaticMeshComponent* Mesh;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
	USpringArmComponent* SpringArm;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
	UCameraComponent* Camera;	

//Variables
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float MoveForce = 500.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
float JumpImpulse = 1000.0f;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
int32 MaxJumpCount = 1;

public:

// Called to bind functionality to input
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;

private:
int32 JumpCount = 0;

//Functions
void MoveRight(float value);
void MoveForward(float value);
void Jump();

};

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

#include “Test/Game/ARollaBallPlayer.h”
#include “GameFramework/SpringArmComponent.h”
#include “Camera/CameraComponent.h”

// Sets default values
AARollaBallPlayer::AARollaBallPlayer()
{
// Set this pawn to call Tick() every frame. You can turn this off to improve performance if you don’t need it.
PrimaryActorTick.bCanEverTick = false;

//Create compoments - Before this step they won't exist on our Actor, they've only been defined.
Mesh = CreateDefaultSubobject<UStaticMeshComponent>("Mesh");
SpringArm = CreateDefaultSubobject<USpringArmComponent>("SpringArm");
Camera = CreateDefaultSubobject<UCameraComponent>("Camera");

//Set the root component to be our Mesh.
RootComponent = Mesh;
//Attach the SpringArm to the Mesh, Spring will now follow the Mesh transform.
SpringArm->SetupAttachment(Mesh);
//Attach the Camera to the SpringArm, Camera will now follow the SpringArm transform.
Camera->SetupAttachment(SpringArm);

}

// Called when the game starts or when spawned
void AARollaBallPlayer::BeginPlay()
{
Super::BeginPlay();
}

// Called to bind functionality to input
void AARollaBallPlayer::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
{
Super::SetupPlayerInputComponent(PlayerInputComponent);
}

void AARollaBallPlayer::MoveRight(float value)
{

}

void AARollaBallPlayer::MoveForward(float value)
{
}

void AARollaBallPlayer::Jump()
{
}

The issue lies in the fact that the IImageWrapperModule is not included in your code, but it’s not actually used in the provided code snippet. However, I suspect that you might be using it elsewhere in your project.

To fix the identifier IImageWrapperModule is undefined error, you need to include the ImageWrapper.h file:

cpp

VerifyOpen In EditorEditCopy code

1#include "ImageWrapper.h"

This file is part of the Unreal Engine framework, so you should be able to find it in the engine’s include directory.

Regarding the incomplete type is not allowed error, it’s likely caused by a missing include file or a forward declaration. In your code, you have forward declarations for USpringArmComponent and UCameraComponent, but you’re missing the include files for these classes.

Add the following lines to your ARollaBallPlayer.h file:

cpp

VerifyOpen In EditorEditCopy code

1#include "GameFramework/SpringArmComponent.h"
2#include "Camera/CameraComponent.h"

Alternatively, you can move these includes to your ARollaBallPlayer.cpp file, if you prefer.

Here’s the updated code:

cpp

VerifyOpen In EditorEditCopy code

1// AROLLaBallPlayer.h
2#pragma once
3
4#include "CoreMinimal.h"
5#include "GameFramework/Pawn.h"
6#include "GameFramework/SpringArmComponent.h"
7#include "Camera/CameraComponent.h"
8#include "ImageWrapper.h" // Add this line if you're using IImageWrapperModule
9
10class USpringArmComponent;
11class UCameraComponent;
12
13UCLASS()
14class TEST_API AARollaBallPlayer : public APawn
15{
16    // ...
17};
18
19// AROLLaBallPlayer.cpp
20// ...

If you’re still experiencing issues, please provide more details about the errors, such as the exact error messages and the lines of code that are causing the errors.