SurferTim:
If you have any of those like that in your code (group of three !!!), that has been known to stop a code upload.
That issue is supposed to have been addressed in latest version of the mega2560 bootloader.
The problem he is having is that the version of avrdude he using (5.10) doesn't understand what the "wiring" protocol is.