Why I am getting the error on OnComponentBeginOverlap.AddDynamic(this, &AMyRock::TriggerEvent)

.h file
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/StaticMeshComponent.h"
#include "Components/BoxComponent.h"
#include "GameFramework/Character.h"
#include "MyRock.generated.h"

UCLASS()
class LEARN_COLLISION_API AMyRock : public AActor
{
	GENERATED_BODY()
	
public:	
	// Sets default values for this actor's properties
	AMyRock();

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

public:	
	// Called every frame
	virtual void Tick(float DeltaTime) override;

	UPROPERTY(EditAnywhere)
		UShapeComponent* MyBox;
	UPROPERTY(EditAnywhere)
		UStaticMeshComponent* MyMesh;
	UPROPERTY(EditAnywhere, Category = "My Rock")
		float SpeedScale;
	float RunningTime = 0.0f;


	const FVector StartLocation = FVector(-3937, -99, 220);

	UFUNCTION()
		void TriggerEvent(AActor* OtherActor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepREsult);



}

.cpp file

#include "MyRock.h"

// Sets default values
AMyRock::AMyRock()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;
	MyBox = CreateDefaultSubobject<UBoxComponent>(TEXT("MyBox"));
	MyBox->SetGenerateOverlapEvents(true);
	MyBox->SetRelativeScale3D(FVector(3, 3, 3));
	RootComponent = MyBox;
	MyMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MyMesh"));
	MyMesh->SetupAttachment(RootComponent);
	SpeedScale = 0.0f;
	MyBox->OnComponentBeginOverlap.AddDynamic(this, &AMyRock::TriggerEvent);


}

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

// Called every frame
void AMyRock::Tick(float DeltaTime)
{
	Super::Tick(DeltaTime);
	RunningTime += DeltaTime;
	FVector NewLocation = GetActorLocation();
	float DeltaWidth = FMath::Sin(RunningTime+DeltaTime) - FMath::Sin(RunningTime);
	NewLocation.Y += DeltaWidth * SpeedScale;
	SetActorLocation(NewLocation);


}

void AMyRock::TriggerEvent(AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepREsult)
{
	if (OtherActor->IsA(ACharacter::StaticClass()))
		OtherActor->SetActorLocation(StartLocation);
}

Output Log
1>------ Skipped Build: Project: UE4, Configuration: BuiltWithUnrealBuildTool Win32 ------
1>Project not selected to build for this solution configuration
2>------ Build started: Project: learn_collision, Configuration: Development_Editor x64 ------
2>Parsing headers for learn_collisionEditor
2> Running UnrealHeaderTool “C:\Users\NoobMaster\Documents\Unreal Projects\learn_collision\learn_collision.uproject” “C:\Users\NoobMaster\Documents\Unreal Projects\learn_collision\Intermediate\Build\Win64\learn_collisionEditor\Development\learn_collisionEditor.uhtmanifest” -LogCmds=“loginit warning, logexit warning, logdatabase error” -Unattended -WarningsAsErrors -installed
2>Reflection code generated for learn_collisionEditor in 6.4866585 seconds
2>Building learn_collisionEditor…
2>Using Visual Studio 2019 14.24.28314 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314) and Windows 10.0.18362.0 SDK (C:\Program Files (x86)\Windows Kits\10).
2>Building 5 actions with 8 processes…
2> [1/5] MyRock.cpp

**2>C:\Users\NoobMaster\Documents\Unreal Projects\learn_collision\Source\learn_collision\MyRock.cpp(18): error C2664: 'void TSparseDynamicDelegate::__Internal_AddDynamic(UserClass
,void (__cdecl AMyRock:: )(UPrimitiveComponent *,AActor
*,UPrimitiveComponent ,int32,bool,const FHitResult &),FName)’: cannot convert argument 2 from 'void (__cdecl AMyRock:: )(AActor *,UPrimitiveComponent
,int32,bool,const FHitResult &)’ to 'void (__cdecl AMyRock:: )(UPrimitiveComponent *,AActor
,UPrimitiveComponent ,int32,bool,const FHitResult &)’ 2> with 2> [ 2> UserClass=AMyRock 2> ] 2> C:\Users\NoobMaster\Documents\Unreal Projects\learn_collision\Source\learn_collision\MyRock.cpp(18): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast 2> C:\Program Files\Epic Games\UE_4.24\Engine\Source\Runtime\CoreUObject\Public\UObject/SparseDelegate.h(339): note: see declaration of ‘TSparseDynamicDelegate::__Internal_AddDynamic’

2> [2/5] MyRock.gen.cpp
2>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.MakeFile.Targets(44,5): error MSB3075: The command ““C:\Program Files\Epic Games\UE_4.24\Engine\Build\BatchFiles\Build.bat” learn_collisionEditor Win64 Development -Project=“C:\Users\NoobMaster\Documents\Unreal Projects\learn_collision\learn_collision.uproject” -WaitMutex -FromMsBuild” exited with code 5. Please verify that you have sufficient rights to run this command.
2>Done building project “learn_collision.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

Blockquote