Server functions with parameters

I am trying to call a server function with parameters but I am not sure how to do it.

I am learning networking and this is like my first tests on it.
.h

UFUNCTION(reliable, server, WithValidation)
void ServerHitBlaBla(UPrimitiveComponent* PrimitiveComp, FVector Direction, FVector Location);

.cpp

void APSETPCCharacter::ServerHitBlaBla_Validate(UPrimitiveComponent* PrimitiveComp, FVector Direction, FVector Location)
{
	return true;
}

void APSETPCCharacter::ServerHitBlaBla_Implementation(UPrimitiveComponent* PrimitiveComp, FVector Direction, FVector Location)
{
	GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Red, "Works");
	PrimitiveComp->AddImpulseAtLocation(((Direction / (Direction.Size() / 1000)) * 500), Location);
}

This shows error. Basically when this is a basic firing test I am doing. When my targets hits something I want to move it with an impulse in both clien and server

I am calling this functions with something like this.

		if (Role < ROLE_Authority)
		{
			ServerHitBlaBla(PrimitiveComp, SecondTraceDirection, FirstTraceEnd);
		}

I am sure this is not how it is done but i am just testing it.

See the community wiki for networking: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Read the part about component replication. Components aren’t replicated by default. Passing the “hit” component from the server to the client isn’t a good idea anyway. Trying to add an “impulse” to a component on both the client and server from a server generated function is not going to appear correct on the client, there is many milliseconds of latency between the invocation on the server and the resulting call on the client.

Seen it but there are no sever functions with parameters there. I am doing the same as it is doing with validate and implementation.

Ok… But I was not going to use this though. I was testing how it works out.

But can server functions with parameters be called in that manner?

Bro, I’m new to UE4 but void type doesn’t have a return, change it to bool. MB it will help