Hi all,
I am getting an error message which I can’t seem to debug and need fresh eyes to look over thusly:
CompilerResultsLog: [1/4] ShooterController.cpp
CompilerResultsLog: D:\Unreal Development\SimpleShooterVE\Source\SimpleShooterVE\ShooterController.cpp(9) : error C2572: 'AShooterController::GameHasEnded': redefinition of default argument: parameter 1
CompilerResultsLog: D:\Unreal Development\SimpleShooterVE\Source\SimpleShooterVE\ShooterController.h(20): note: see declaration of 'AShooterController::GameHasEnded'
CompilerResultsLog: D:\Unreal Development\SimpleShooterVE\Source\SimpleShooterVE\ShooterController.cpp(9) : error C2572: 'AShooterController::GameHasEnded': redefinition of default argument: parameter 2
CompilerResultsLog: D:\Unreal Development\SimpleShooterVE\Source\SimpleShooterVE\ShooterController.h(20): note: see declaration of 'AShooterController::GameHasEnded'
LogMainFrame: MainFrame: Module compiling took 6.828 seconds
So, the problem is defintely the GameHasEnded function call in ShooterController.h or Shooter Controller.cpp but I can’t see it
In ShooterController.h I have this:
public:
//GameHasEnded override
virtual void GameHasEnded(class AActor *EndGameFocus = nullptr, bool bIsWinner = false) override;
And in ShooterController.cpp I have this:
void AShooterController::GameHasEnded(class AActor *EndGameFocus = nullptr, bool bIsWinner = false) {
//because it overridden must use super
Super::GameHasEnded(EndGameFocus, bIsWinner);
UE_LOG(LogTemp, Warning, TEXT("We have been Killed") );
}
Would someone please be able to point out the error I have made. Any help would be very much appreciated.
Regards.