Timeout error: failed to execute command 0x13. Arduino Mega2560

I was going to post this as a problem but i figured it out in my case.

My program would not upload to my arduino, it would timeout over and over again. Even though example sketches provided with the arduino loaded without any issues.

I was testing each line of code in a new sketch to see what the problem was apparently it is this...

Serial.println("WELCOME!!! \nTHE AUTOMATED CATAPULT IS NOW OPERATIONAL"); //this is the welcome message when you open up the serial monitor

The three exclamation marks caused the issue. Literally those 3 !!! caused the issue. I removed one ! and it worked.

Can anyone explain why this would be the issue?

It’s a feature

The bootloader looks for “!!!” and drops into some sort of interactive monitor. So, don’t use them in your sketch, or get an updated bootloader.