x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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 ==========

Product Version: Not Selected
Tags:
more ▼

asked May 02 '15 at 10:32 AM in C++ Programming

avatar image

Dark583
76 5 88 14

avatar image Dark583 May 02 '15 at 10:45 AM

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

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

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Hello, Karwler

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

Hope this helped!

Good luck!

more ▼

answered May 15 '15 at 12:23 PM

avatar image

Andrii Melnyk
1.8k 60 19 111

(comments are locked)
10|2000 characters needed characters left

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

more ▼

answered May 02 '15 at 07:19 PM

avatar image

Karwler
138 10 11 26

avatar image Dark583 May 02 '15 at 08:49 PM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question