Project stopped compiling with error

I have been working on my project for a while now, and out of the blue when I complied it gave me a few errors. Any ideas on how I can fix this would be great, as I have exhausted myself trying to figure this out. From what I understand it is telling me my onRep_Money is not defined? But that is not possible because it is.

Severity Code Description Project File Line Suppression State
Error LNK1120 1 unresolved externals SGame G:\GitHub\SGame\SGame\Binaries\Win64\UE4Editor-SGame.dll 1
Error Failed to produce item: G:\GitHub\SGame\SGame\Binaries\Win64\UE4Editor-SGame.dll SGame G:\GitHub\SGame\SGame\Intermediate\ProjectFiles\ERROR 1
Error MSB3075 The command ““C:\Program Files\Epic Games\4.12\Engine\Build\BatchFiles\Build.bat” SGameEditor Win64 Development “G:\GitHub\SGame\SGame\SGame.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. SGame C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41
Error LNK2001 unresolved external symbol “public: virtual void __cdecl APlayerState::OnRep_Money(void)” (?OnRep_Money@APlayerState@@UEAAXXZ) SGame
G:\GitHub\SGame\SGame\Intermediate\ProjectFiles\Module.SGame.cpp.obj 1
Error LNK2001 unresolved external symbol “public: virtual void __cdecl APlayerState::OnRep_Money(void)” (?OnRep_Money@APlayerState@@UEAAXXZ) SGame
G:\GitHub\SGame\SGame\Intermediate\ProjectFiles\SGame.generated.cpp.obj 1

Looks like a virtual linker error - which means you’ve defined it but probably haven’t implemented it.

Make sure your .cpp file has the function there - even if it’s empty. Virtual functions have to be implemented.

Thanks for the reply, I’ve been so busy with work I haven’t had time to get back to my game dev! I actually did, so I tried removing it and now I am getting a code MSB3075, The command ““C:\Program Files\Epic Games\4.12\Engine\Build\BatchFiles\Build.bat” SGame Win64 Development “G:\GitHub\SGame\SGame\SGame.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command. SGame C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets 41

I am not sure what happend, it was compiling no problem then one day it just stopped. I tried googling the above problem and I am bingo on resolutions.

I’m now also receiving this latest error. A complete Rebuild seems to work, as does closing the Editor, but both are cumbersome “solutions”!

My question on AnswerHub.

Sufficient rights errors like these are usually solved by running visual studio in admin mode

The issue seems to occur after one or two regular “Build” compiles (that succeed), after that the error pops up and a “Rebuild” is required (or the closing of the Editor).

It would seem to me that this is not actually a rights issue. I’ve already launched VS in admin mode before and it did not change anything.