@Albatroz END_PRINT looks like a Klipper type macro invocation; in their infinite wisdom they decided to use bare words for this without regard for the GCode standard.
In RepRapFirmware this means the bare word is applied to the previous line as a parameter, which yields the error you observed.
You can replace END_PRINT with M0 if you want to invoke end of print behavior, which you can tweak using the 0:/sys/stop.g macro.