How to fix this error (expected ',' or ';' before 'int' exit status 1)?
Change your program like this:
int Led1=13;
int Led2=10;
int tone1=6; // &lt;-- Add the missing semicolon here
int D=300;


void setup(){
  pinMode(Led1,OUTPUT);
  pinMode(Led2,OUTPUT);
  pinMode(tone1,OUTPUT);
}

void loop(){
// Remove the declaration of D here, it's already defined in the outer scope
digitalWrite(Led1,1);
digitalWrite(Led2,0);
delay(D);
// Set the leds inverse (otherwise, nothing happens, since setting the state twice doesn't do anything)
digitalWrite(Led1,0);
digitalWrite(Led2,1);
delay(D);
}