Why is this an issue?

Passing the wrong number of arguments to a call to System.SysUtils.Format raises a runtime exception.

Typically, the number of arguments should exactly match the number of format specifiers in the string. For some complex cases, a different number of arguments is required

How to fix it

Ensure that the arguments to the Format call match the specifiers in the format string:

Format('%s (class %d) got %.*f percent on the test.', ['Bob', 74.599]);
Format('%s (class %d) got %.*f percent on the test.', ['Bob', 6, 2, 74.599]);

Resources