Well, for starters, you shouldn’t use “int”. Use int32.
You’re getting a linker error. You should try to toggle the replication field in UPROPERTY() macro and see if the linker error can be toggled on and off. If it can be, that narrows down the scope of your investigation.
Whenever I remove the Replicated field from the UPROPERTY(), the error goes away. And when I reenter the field, the error comes back. Not sure what else to go on though. I’ve seen certain guides and it seems that all you need is that Replicated field in the UPROPERTY().
You need to add the function GetLifetimeReplicatedProps to your cpp file to describe the replicated variable. You may also need to include UnrealNetwork.h