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"

FString overloaded params: none of the 11 overloads could convert all the argument types

I got this error trying to overload a method for message debugging purposes:

 1>g:\epic games\ue_4.15\engine\source\runtime\core\public\Logging/LogMacros.h(34): error C2665: 'CheckVA': none of the 11 overloads could convert all the argument types
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(87): note: could be 'bool CheckVA(bool)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(86): note: or       'void *CheckVA(ANSICHAR *)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(85): note: or       'TCHAR CheckVA(TCHAR)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(84): note: or       'long CheckVA(unsigned long)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(83): note: or       'long CheckVA(long)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(82): note: or       'double CheckVA(double)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(81): note: or       'int64 CheckVA(int64)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(80): note: or       'uint64 CheckVA(uint64)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(79): note: or       'int32 CheckVA(int32)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(78): note: or       'uint8 CheckVA(uint8)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Misc/VarArgs.h(77): note: or       'uint32 CheckVA(uint32)'
 1>  g:\epic games\ue_4.15\engine\source\runtime\core\public\Logging/LogMacros.h(34): note: while trying to match the argument list '(FString)'
 note: see reference to function template instantiation 'void FMsg::Logf_Internal<FString>(const ANSICHAR *,int32,const FName &,ELogVerbosity::Type,const TCHAR *,T1)' being compiled

I'm not sure, but this means FString is not supported for overloading? I didn't understand this error

Here's the relevant part of the code:


 void DebugMethod_LowPriority(FString ClassName, FString MethodName, TArray<FString> AdditionalInformation);
 void DebugMethod_LowPriority(FString ClassName, FString MethodName);
Product Version: UE 4.15
more ▼

asked May 01 '17 at 07:50 PM in C++ Programming

avatar image

49 6 14 15

avatar image Gbr May 01 '17 at 07:58 PM

In the end it has nothing to do with what I thought, the problem is in this line, inside the method definition:

 UE_LOG(LogTemp, Log, TEXT("%s"), FinalMessage);

FinalMessage is a FString.

I need to find the proper way to include this FString correctly in this case.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Dereferencing the FString does the trick

  UE_LOG(LogTemp, Log, TEXT("%s"), *FinalMessage);

Sorry for the confusion that led to this thread, at least I got to solve this by myself (and Rama, as always https://wiki.unrealengine.com/Logs,_Printing_Messages_To_Yourself_During_Runtime#Related_Tutorial) =]

more ▼

answered May 01 '17 at 08:12 PM

avatar image

49 6 14 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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