Do you have a function on ACyberWeapon that looks like this?
void AShip::GetLifetimeReplicatedProps(TArray<FLifetimeProperty> &OutLifetimeProps) const
{
Super::GetLifetimeReplicatedProps(OutLifetimeProps);
DOREPLIFETIME(AShip, MaxArmor);
DOREPLIFETIME(AShip, Armor);
DOREPLIFETIME(AShip, ShipAbility);
DOREPLIFETIME_CONDITION(AShip, bIsFiring, COND_SkipOwner);
DOREPLIFETIME_CONDITION(AShip, bIsUsingAbility, COND_SkipOwner);
}
UE4Newbie
(DavisEllwood)
2
Trying to replicate the WeaponState of the player over network with this code
UPROPERTY(Replicated)
TEnumAsByte<EWeaponState> WeaponState = GUN_IDLE;
but whenever I try to to run I get this error
Error 1 error LNK2001: unresolved external symbol "public: virtual void __cdecl ACyberWeapon::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class FDefaultAllocator> &)const " (?GetLifetimeReplicatedProps@ACyberWeapon@@UEBAXAEAV?$TArray@VFLifetimeProperty@@VFDefaultAllocator@@@@@Z) C:\Users\Davis\Documents\Unreal Projects\CyberOnline\Intermediate\ProjectFiles\CyberWeapon.cpp.obj CyberOnline
any ideas? Ask if you need the rest of the header file.