Problem with uploading any code

peterultraman:
I meant that I wasn't using any external power source, I only used the usb cable to power the servo.

Bad idea which probably bricked your Arduino.