#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?