Hey FTC,
I did retry, clean, rebuild, no success.
is my exact code:
UFUNCTION(Server, WithValidation, Reliable)
void ServerSetupYagFdPGeneral();
virtual void ServerSetupYagFdPGeneral_Implementation();
----------------------------------------------------------------------
bool AYagGameState::ServerSetupYagFdPGeneral_Validate(){ return true; }
void AYagGameState::ServerSetupYagFdPGeneral_Implementation(){SetupYagFdPGeneral();}
And the messages i get:
1>C:\Users\cedric\Documents\Unreal Projects\yag 4.7\Source\yag\game/YagGameState.h(80): error C2535: 'void AYagGameState::ServerSetupYagFdPGeneral_Implementation(void)' : fonction membre déjà définie ou déclarée
1> C:\Users\cedric\Documents\Unreal Projects\yag 4.7\Source\yag\game/YagGameState.h(49) : voir la déclaration de 'AYagGameState::ServerSetupYagFdPGeneral_Implementation'
The messages are in french so they come from VS, not from UE4.
“fonction membre déjà définie ou déclarée” means “member function already defined or declared”
“voir la déclaration de” means “see declaration of”
I am a beginner in c++ and have no experience with the virtual keyword. From what i understood on the net, when overridding a method, the virtual keyword allows to ignore the type of the pointer and always call the derived method.
So my guess would be that the story goes like that:
4.6: the macro adds void ServerSetupYagFdPGeneral_Implementation();
4.7: the macro generates a warning and adds void ServerSetupYagFdPGeneral_Implementation() override;
4.8: the macro will add nothing and will gives us a warning telling us to suppress the virtual keyword
In this scenario my “already defined” error would mean that the macro forgets to add the override kw behind its own declaration. But if anyone of you guys manages to compile with no errors and no warnings, my guess is wrong. With my current knowledge i can’t come up with a better scenario ![]()
I don’t know if “virtual” and “override” allow to override the method in the same namespace though. It’s the sort of knowledge experience gives you and i don’t have.
Appareantly VS doesn’t appreciate.
I might be entirely wrong, again, i’m still a padawan in this field^^
Cheers
Cedric