How Do you Override a function from pawn to the character

Just by placing this one line of Code inside my characters header file it creates all these error. How do you correctly override a function? I want to rewrite GetPawnViewLocation in the same way i did previously in UDK to get the location of an eye socket and recreate a simple true person we achieved then. If i remove this one line of code all the errors go away

virtual void FVector GetPawnViewLocation() const OVERRIDE;

d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2146: syntax error : missing ‘;’ before identifier ‘GetPawnViewLocation’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2182: ‘FVector’ : illegal use of type ‘void’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2433: ‘AdarkstormCharacter::FVector’ : ‘virtual’ not permitted on data declarations
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108): error C2146: syntax error : missing ‘;’ before identifier 'GetPawnViewLocation’d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): warning C4996: OVERRIDE macro is deprecated. Please use override keyword instead.
1>
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108): error C2182: ‘FVector’ : illegal use of type 'void’d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C4183: ‘GetPawnViewLocation’: missing return type; assumed to be a member function returning 'int’D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108) : error C2433: ‘AdarkstormCharacter::FVector’ : ‘virtual’ not permitted on data declarations
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(110): error C2555: ‘AdarkstormCharacter::GetPawnViewLocation’: overriding virtual function return type differs and is not covariant from ‘APawn::GetPawnViewLocation’
1>
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108): warning C4996: OVERRIDE macro is deprecated. Please use override keyword instead.
1> D:\Development Software\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\GameFramework/Pawn.h(301) : see declaration of 'APawn::GetPawnViewLocation’D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(108): error C4183: ‘GetPawnViewLocation’: missing return type; assumed to be a member function returning ‘int’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.h(110): error C2555: ‘AdarkstormCharacter::GetPawnViewLocation’: overriding virtual function return type differs and is not covariant from ‘APawn::GetPawnViewLocation’
1> D:\Development Software\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\GameFramework/Pawn.h(301) : see declaration of ‘APawn::GetPawnViewLocation’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2146: syntax error : missing ‘;’ before identifier ‘GetPawnViewLocation’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2182: ‘FVector’ : illegal use of type ‘void’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C2433: ‘AdarkstormCharacter::FVector’ : ‘virtual’ not permitted on data declarations
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): warning C4996: OVERRIDE macro is deprecated. Please use override keyword instead.
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(108): error C4183: ‘GetPawnViewLocation’: missing return type; assumed to be a member function returning ‘int’
1>d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(110): error C2555: ‘AdarkstormCharacter::GetPawnViewLocation’: overriding virtual function return type differs and is not covariant from ‘APawn::GetPawnViewLocation’
1> D:\Development Software\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\GameFramework/Pawn.h(301) : see declaration of ‘APawn::GetPawnViewLocation’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(28): error C2064: term does not evaluate to a function taking 3 arguments
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(34): error C2064: term does not evaluate to a function taking 3 arguments
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(42): error C2064: term does not evaluate to a function taking 3 arguments
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(87): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(87): error C2146: syntax error : missing ‘;’ before identifier ‘SpawnLocation’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(87): error C2065: ‘SpawnLocation’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(93): error C2065: ‘SpawnLocation’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(116): error C2146: syntax error : missing ‘,’ before identifier ‘Location’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(117): error C2511: ‘void AdarkstormCharacter::BeginTouch(const ETouchIndex::Type,const int)’ : overloaded member function not found in ‘AdarkstormCharacter’
1> d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(11) : see declaration of ‘AdarkstormCharacter’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(118): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(122): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(123): error C2228: left of ‘.FingerIndex’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(124): error C2228: left of ‘.Location’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(124): error C2065: ‘Location’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(125): error C2228: left of ‘.bMoved’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(128): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(128): error C2146: syntax error : missing ‘,’ before identifier ‘Location’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(129): error C2511: ‘void AdarkstormCharacter::EndTouch(const ETouchIndex::Type,const int)’ : overloaded member function not found in ‘AdarkstormCharacter’
1> d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(11) : see declaration of ‘AdarkstormCharacter’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(130): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(134): error C2228: left of ‘.FingerIndex’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(134): error C2228: left of ‘.bMoved’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(136): error C2352: ‘AdarkstormCharacter::OnFire’ : illegal call of non-static member function
1> d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(55) : see declaration of ‘AdarkstormCharacter::OnFire’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(138): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(141): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(141): error C2146: syntax error : missing ‘,’ before identifier ‘Location’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(142): error C2511: ‘void AdarkstormCharacter::TouchUpdate(const ETouchIndex::Type,const int)’ : overloaded member function not found in ‘AdarkstormCharacter’
1> d:\users\robert\documents\unreal projects\darkstorm\source\darkstorm\darkstormCharacter.h(11) : see declaration of ‘AdarkstormCharacter’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(143): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(143): error C2228: left of ‘.FingerIndex’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(145): error C2228: left of ‘.bIsPressed’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(147): error C2352: ‘AActor::GetWorld’ : illegal call of non-static member function
1> D:\Development Software\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(2128) : see declaration of ‘AActor::GetWorld’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(149): error C2352: ‘AActor::GetWorld’ : illegal call of non-static member function
1> D:\Development Software\Epic Games\4.7\Engine\Source\Runtime\Engine\Classes\GameFramework/Actor.h(2128) : see declaration of ‘AActor::GetWorld’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(149): error C2227: left of ‘->GetGameViewport’ must point to class/struct/union/generic type
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(152): error C2146: syntax error : missing ‘;’ before identifier ‘MoveDelta’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(152): error C2065: ‘MoveDelta’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(152): error C2065: ‘Location’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(152): error C2228: left of ‘.Location’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(155): error C2065: ‘MoveDelta’ : undeclared identifier
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(155): error C2228: left of ‘.X’ must have class/struct/union
1> type is ‘unknown-type’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(155): error C2228: left of ‘.Y’ must have class/struct/union
1> type is ‘unknown-type’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(158): error C2228: left of ‘.bMoved’ must have class/struct/union
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(159): error C2597: illegal reference to non-static member ‘AdarkstormCharacter::BaseTurnRate’
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(159): error C3867: ‘AdarkstormCharacter::BaseTurnRate’: function call missing argument list; use ‘&AdarkstormCharacter::BaseTurnRate’ to create a pointer to member
1>D:\Users\Robert\Documents\Unreal Projects\darkstorm\Source\darkstorm\darkstormCharacter.cpp(159): error C2568: ‘*’ : unable to resolve function overload
1> unable to recover from previous error(s); stopping compilation
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: D:\Users\Robert\Documents\Unreal Projects\darkstorm\Binaries\Win64\UE4Editor-darkstorm-5166.dll
1> Cumulative action seconds (4 processors): 0.00 building projects, 1.37 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.00 linking, 0.00 other
1> UBT execution time: 8.61 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command ““D:\Development Software\Epic Games\4.7\Engine\Build\BatchFiles\Build.bat” darkstormEditor Win64 Development “D:\Users\Robert\Documents\Unreal Projects\darkstorm\darkstorm.uproject” -rocket” exited with code -1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 1 skipped ==========

I also tried this method to no luck,.,.

Assuming that you’ve put the function in a class derived from the original. Try declaring like that
void FVector GetPawnViewLocation() const;

Well its in the character Header isnt that a child of pawn?

Hello,

To fix the error, please implement the function in your Character’s .cpp file.

Hope this helped!

Good luck!