Error LNK2005, LNK2001, LNK2019 from replicated function

I have been trying to replicate functions but these errors keep occurring I have #included

MyCharacter.gen.cpp.obj : error LNK2005: “public: void __cdecl AMyCharacter::HandleFire(void)” (?HandleFire@AMyCharacter@@QEAAXXZ) already defined in MyCharacter.cpp.obj

and

MyCharacter.cpp.obj : error LNK2001: unresolved external symbol “public: virtual void __cdecl AMyCharacter::HandleFire_Implementation(void)” (?HandleFire_Implementation@AMyCharacter@@UEAAXXZ)

and

MyCharacter.cpp.obj : error LNK2019: unresolved external symbol “public: __cdecl AMyCharacter::AMyCharacter(class FObjectInitializer const &)” (??0AMyCharacter@@QEAA@AEBVFObjectInitializer@@@Z) referenced in function “public: static void __cdecl AMyCharacter::__DefaultConstructor(class FObjectInitializer const &)” (?__DefaultConstructor@AMyCharacter@@SAXAEBVFObjectInitializer@@@Z)

please help me I have had this error for a week now

###character.h
FTimerHandle FiringTimer;

 UPROPERTY(EditDefaultsOnly, Category = "Gameplay")
 float FireRate;

 bool bIsFiringWeapon;

 UFUNCTION(BlueprintCallable, Category = "Gameplay")
 void StartFire();

 UFUNCTION(BlueprintCallable, Category = "Gameplay")
 void StopFire();

 UFUNCTION(Server, Reliable)
 void HandleFire();

###character.cpp
void AMyCharacter::StartFire()
{
if (!bIsFiringWeapon)
{
bIsFiringWeapon = true;
UWorld* World = GetWorld();
World->GetTimerManager().SetTimer(FiringTimer, this, &AMyCharacter::StopFire, FireRate, false);
HandleFire();
}
}

  void AMyCharacter::StopFire()
   {
        bIsFiringWeapon = false;
   }

   void AMyCharacter::HandleFire()
   {
         FVector spawnLocation = GetActorLocation() + (GetControlRotation().Vector()  * 100.0f) + (GetActorUpVector() * 50.0f);
          FRotator spawnRotation = GetControlRotation();

          FActorSpawnParameters spawnParameters;
          spawnParameters.Instigator = Instigator;
          spawnParameters.Owner = this;
    }

If you have a function in your C++ header file called “Blah”, and it’s hooked up to Unreal via macros like BlueprintCallable, then you need to call it Blah_Implementation in the .CPP file.

Why? When in vanilla C++ you’d just call it MyClass::Blah and call it a day? Because Unreal actually implements a function called MyClass::Blah behind the scenes for you that hides the fact that you’re calling into Blueprint or sending a network RPC, and you can just call myClass->Blah() transparently, as if all that functionality were a natural part of a C++ program, without having to think about those details. It’s a design decision basically.

Ultimately what this compiler error is saying is that you declared a function called MyClass::Blah, and then implemented it twice (Unreal created an implementation for you and then you created a second one), which is bad because the compiler only expects it to be defined once. The other error basically means that Unreal declared a function called Blah_Implementation but you didn’t actually define that function in a .cpp file. (Technically this kind of error is called a Linker Error, which is why the error ID starts with LNK. The linker is the last stage of a C++ compiler where it tries to link everything that’s been compiled together, which is where it notices if something has been defined twice or declared but never defined)

thanks that cleared things but The UFUNCTION(Serer, Reliable) void HandleFire() gets a green line underneath asking ist definition is not found when I put _Implementation on its definition and gives me fatal LNK2019