PrintFormat or StringFormat ERR_FORMAT_TOO_MANY_FORMATTERS

 

Hello,

I have many Format Function in Code, there are sometimes this error

ERR_FORMAT_TOO_MANY_FORMATTERS

Does PrintFormat or StringFormat have a limit?

Nested StringFormat have limitation?

 

PrintFormat documentation says:

PrintFormat

Total number of parameters can't exceed 64 including the format string



That means - format string can have up to 63 parameters.

If you have more, than split your print format into multiple StringFormat statements and then use PrintFormat to print those strings.

PrintFormat - Common Functions - MQL4 Reference
PrintFormat - Common Functions - MQL4 Reference
  • docs.mql4.com
PrintFormat - Common Functions - MQL4 Reference
 
Yong Zheng:

Hello,

I have many Format Function in Code, there are sometimes this error

Does PrintFormat or StringFormat have a limit?

Nested StringFormat have limitation?

Could you show the code that gives this error?

Do you use formatters to inject more formatters into the string?

Usually this error is raised when you have more format specifiers than inputs. So probably an issue with your code, and not with the functions...
 
I have solved the problem, there are many PrintFormat, so there are hard to check where the problem is.
 
Yong Zheng #: , there are many PrintFormat, so there are hard to check where the problem is.

Wrong. The compile error gave you the line number.