I’m getting the following build errors while trying to compile my code, despite it being identical to the ‘ShooterGame’ code. I can’t figure out exactly where the problem is occuring and the compiler isn’t pointing me to anywhere that can narrow it down.
The Error:
1>e:\thesommeue4\thesomme\intermediate\builddata\include\thesomme\../../../../Source/TheSomme/TheSommeWeapon.h(81): error C2061: syntax error : identifier 'ATheSommeCharacter'
1>E:\TheSommeUE4\TheSomme\Source\TheSomme\TheSommeCharacter.cpp(133): error C2660: 'ATheSommeWeapon::OnEnterInventory' : function does not take 1 arguments
1>E:\TheSommeUE4\TheSomme\Source\TheSomme\TheSommeWeapon.cpp(127): error C2511: 'void ATheSommeWeapon::OnEnterInventory(ATheSommeCharacter *)' : overloaded member function not found in 'ATheSommeWeapon'
1> e:\thesommeue4\thesomme\intermediate\builddata\include\thesomme\../../../../Source/TheSomme/TheSommeWeapon.h(55) : see declaration of 'ATheSommeWeapon'
1>E:\TheSommeUE4\TheSomme\Source\TheSomme\TheSommeWeapon.cpp(522): error C2660: 'ATheSommeWeapon::OnEnterInventory' : function does not take 1 arguments
The areas of interest:
ATheSommeWeapon.cpp
void ATheSommeWeapon::OnEnterInventory(ATheSommeCharacter* NewOwner)
{
SetOwningPawn(NewOwner);
}
void ATheSommeWeapon::OnRep_MyPawn()
{
if (MyPawn)
{
OnEnterInventory(MyPawn);
}
else
{
OnLeaveInventory();
}
}
TheSommeCharacter:
void ATheSommeCharacter::AddWeapon(ATheSommeWeapon* Weapon)
{
if (Weapon && Role == ROLE_Authority)
{
Weapon->OnEnterInventory(this);
Inventory.AddUnique(Weapon);
}
}