my program doesnt upload on aurdino but it is compiled

#include<Adafruit_GPS.h>
#include<SoftwareSerial.h>
#include<SD.h>
#include<SPI.h>

SoftwareSerial mySerial(3,2);
Adafruit_GPS GPS(&mySerial);
String NMEA1;
String NMEA2;
char c;
int chipSelect=4;
File mySensorData;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
GPS.begin(115400);
GPS.sendCommand("$PGCMD,33,0*6D");
GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ);
GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA);
delay(100);
pinMode(10,OUTPUT);
SD.begin(chipSelect);
if (SD.exists("NMEA1.txt")){
SD.remove("NMEA1 txt");
}
if(SD.exists("NMEA2.txt")){
SD.remove("NMEA2.txt");
}
if(SD.exists("GPSdata.txt")){
SD.remove("GPSdata.txt");

}
}

void loop() {
// put your main code here, to run repeatedly:
readgps();
if(GPS.fix==1){
mySensorData=SD.open("NMEA.txt",FILE_WRITE);
mySensorData.println((NMEA1));
mySensorData.println((NMEA2));
mySensorData.close();
mySensorData=SD.open("GPSdata.txt",FILE_WRITE);
mySensorData.print((GPS.latitude,4));
mySensorData.print(GPS.lat);
mySensorData.print(",");
mySensorData.print((GPS.longitude,4));
mySensorData.print(GPS.lon);
mySensorData.print(",");
mySensorData.println((GPS.altitude,4));
mySensorData.close();

}
}

void readgps(){
while(!GPS.newNMEAreceived()){
c=GPS.read();
}
GPS.parse(GPS.lastNMEA());
NMEA1=GPS.lastNMEA();
while(!GPS.newNMEAreceived()){
c=GPS.read();
}
GPS.parse(GPS.lastNMEA());
NMEA2=GPS.lastNMEA();
Serial.println((NMEA1));
Serial.println((NMEA2));
Serial.println("");
}

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that the forum software can interpret parts of your code as markup, leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. If your browser doesn't show the posting toolbar then you can just manually add the code tags:
[code]``[color=blue]// your code is here[/color]``[/code]
Using code tags and other important information is explained in the How to use this forum post. Please read it.

Please always do a Tools > Auto Format on your code before posting it. This will make it easier for you to spot bugs and make it easier for us to read. If you're using the Arduino Web Editor you will not have access to this useful tool but it's still unacceptable to post poorly formatted code. I recommend you to use the standard IDE instead.

Please do this:

  • File > Preferences > Show verbose output during: > compilation (uncheck) > upload (check) > OK
  • Sketch > Upload
  • After the upload fails you'll see a button on the right side of the orange bar "Copy error messages". Click that button.
  • Paste the error messages in a reply here USING CODE TAGS (</> button on the toolbar).