error C2511: 'void UGenericHealthComponent::ServerDegenerateHealth(UCurveFloat *,AActor *,const UDamageType *,AController *,AActor *,float,bool)': overloaded member function not found in 'UGenericHealthComponent'
'void UGenericHealthComponent::ServerDegenerateHealth_Implementation(UCurveFloat *,AActor *,UDamageType *,AController *,AActor *,float,bool)': overloaded member function not found in 'UGenericHealthComponent'
1> C:\Users\BlackHawk\Documents\Unreal Projects\HealthProject\Plugins\GenericHealthFramework\Source\GenericHealthFramework\Public\GenericHealthComponent.h(85): note: see declaration of 'UGenericHealthComponent'
I’m not sure if it’s a must to have but I think you’re missing the WithValidation in the UFUNCTION macro, once you have that added you also need to add in cpp ServerDegenerateHealth_Validate(args…) { return true; }
Edit:
Yeah I think you have to have a validate I quote from this page:
A more recent change was added to UHT to require client->server RPC’s to have a _Validate function. This is to encourage secure server RPC functions, and to make it as easy as possible for someone to add code to check each and every parameter to be valid against all the known input constraints.
I just tried it and it worked for me. I don’t think it’s a bug, have you tried it or not yet ?
Make sure you add the WithValidation and _validate function, or you can temporarily make it a client function just to test.
I have tried and it works. Although in my production code I will be adding cheat protection, but without Validation also it works. So don’t know if it’s compulsory
UFUNCTION(Server, Reliable, BlueprintCallable, Category = "Health")
void Foo(const class UDamageType* DamageType);
void Foo_Implementation(const class UDamageType* DamageType)
{
}
Interesting, I was also able to compile without the WithValidation, perhaps something changed in recent versions because I remember this was something required to have and you can’t compile without it.