Update 2: For anyone who needs a workaround for this issue, here’s my solution that I use for my multiplayer chat system, use an FName as the parameter instead, and convert your FString to FName as follows (till the fix occurs)
GRI .h
UFUNCTION(reliable, server)
void SERVER_ChatToGRI(FName ReceivedText);
controller or anywhere.cpp
FString ChatswithName = "Happy Day";
GRI->SERVER_ChatToGRI(FName( *ChatswithName));
then to convert FName back to string
FString ReceivedString = ReceivedText.ToString();
Update: Anything I am missing here, or will this be fixed in next build? Anyone else able to reproduce this?
Dear Friends at Epic,
Woohoo UE4 is Awesome!!!
I can pass in a FName, but when I try to pass in a FString as follows
.h
UFUNCTION(reliable, server)
void SERVER_AddToVictoryChatText(FString test);
.cpp
void AVictoryGRI::SERVER_AddToVictoryChatText_Implementation(FString test)
{
//some code
}
I get the compile error:
error C2511: ‘void
AVictoryGRI::SERVER_AddToVictoryChatText(const
FString &)’ : overloaded member
function not found in ‘AVictoryGRI’
This can’t possibly be expected behavior, right?
Compiler Erroneous Assumption
Why is the compiler assuming I am using a const FString & when I am not ?
You can’t pass variables by reference into server functions anyway, so why would VS compiler think this?
thanks!
Rama