Error 61: Number of Format Specifier(s) (%) does not match

The second Printf line: "Statistics for: "... is generating
error 61: "The number of format specifier(s) (%) does not match the number of arguments passed."

I'm not sure of what needs to be done. Thank you in advance for your suggestions. John.

wd = DayOfWeek() ;
dow = WriteIf( wd == 1, "Monday", WriteIf( wd = 2, "Tuesday", WriteIf( wd == 3,"Wednesday",
	WriteIf( wd == 4, "Thursday", WriteIf( wd == 5, "Friday", "Week End" ) ) ) ) ) ;

printf( Date() + "\n" ) ;
printf( "Statistics for: " + Name() + ", " + FullName() + "\n"  ) ; 
printf( "Closing price               = " + NumToStr( Close ) + "\n" ) ;
printf( "Change since yesterday      = " + NumToStr( Close - Ref( Close, -1 ) ) + "\n" ) ;
printf( "Percent chg. since yesteday = " + NumToStr( ROC( Close, 1 ) ) + "\n" ) ;

See here

Some of your names or fullnames seem to have "%" sign included.

From AB 6.07 development version:

AFL: printf/StrFormat now implement a check for correct formatting string as sometimes users passed strings with % that is special marker for formatting string instead of %% to print actual percent sign.

Solution:

printf( "Statistics for: %s, %s\n", Name(), FullName()  ) ; 
1 Like

Fxshrat, Thank you. John