Netmulticast is giving a Redefinition Error

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/GameStateBase.h"
#include "FPSGameState.generated.h"

/**
 * this class is a companion to gamemode and can run on both Server and client
 */
UCLASS()
class FPSGAME_API AFPSGameState : public AGameStateBase
{
	GENERATED_BODY()
public:

	UFUNCTION(NetMulticast, Reliable)
	void Function(APawn* InstigatorPawn, bool bMissionSuccess);
	
};


#include "FPSGameState.h"
#include "EngineUtils.h"

void AFPSGameState::Function_Implementation(APawn* InstigatorPawn, bool bMissionSuccess)
{
}

Severity Code Description Project File Line Suppression State
Error LNK2005 “public: virtual void __cdecl AFPSGameState::Function_Implementation(class APawn *,bool)” (?Function_Implementation@AFPSGameState@@UEAAXPEAVAPawn@@_N@Z) already defined in FPSGameMode.cpp.obj FPSGame C:\Users\Varonec\Documents\Unreal
Projects\StealthGame\Intermediate\ProjectFiles\FPSGameState.cpp.obj 1

It returns with this error. I’ve been able to compile with server but NetMulticast is failing why? how do I resolve this?

maybe you have a copy-paste error somewhere, error message would suggest that you already defined it in FPSGameMode.cpp, but just try to search your project for this function.

Wow! thank you for pointing out what my eyes could not. Showing me that is was saying GameMode.cpp.obj and not Gamestate let me check there and I had made an autocomplete error where I included GameState.cpp instead of GameState.h… Thanks again sometimes it’s really hard to see the obvious stuff.

As Lardo stated I had included Gamestate.cpp in another class somewhere which created the same definition in both classes.