I am getting error in code when I am trying to compile code with a replicated structure.
Declaration of the functions
USTRUCT()
struct FArmedWeapons
{
GENERATED_USTRUCT_BODY()
UPROPERTY()
ABaseWeapon* PrimaryWeapon;
UPROPERTY()
ABaseWeapon* SecondaryWeapon;
UPROPERTY()
ABaseWeapon* MeleeWeapon;
FArmedWeapons()
{}
};
And
UPROPERTY(Replicated, RepRetry)
FArmedWeapons ArmedWeapons;
I am getting the error
1>C:/Users/Srikant/Documents/Unreal Projects/PSETPC/Source/PSETPC/Public/ArmedCharacter.h(70): error : In ArmedCharacter: Member variable declaration: 'ArmedWeapons' already defined
1>Error : Failed to generate code for PSETPCEditor - error code: OtherCompilationError (2)
1> UnrealHeaderTool failed for target 'PSETPCEditor' (platform: Win64, module info: C:\Users\Srikant\Documents\Unreal Projects\PSETPC\Intermediate\Build\Win64\PSETPCEditor\Development\UnrealHeaderTool.manifest).