All I could find was a lot of unnecessary braces in the code. For example, you have two opening braces for the loop() function where only one is needed. You also seem to set off every code block with braces where none is needed. You would also benefit from using standard C formatting for your code, which is easily done using Ctrl-T while in the IDE. After removing your unneeded braces, I got:
#include <Servo.h>
unsigned long currentTime;
Servo myservo;
int ddt = 4;
int ddy = 3;
int ddu = 2;
void setup() {
myservo.attach(9);
currentTime = millis();
pinMode(ddt, INPUT);
pinMode(ddy, INPUT);
pinMode(ddu, INPUT);
myservo.write(20);
}
void loop() {
if (digitalRead(ddt) == HIGH) {
myservo.write(100);
}
delay(1000);
currentTime = 2500;
myservo.write(20);
time1();
if (digitalRead(ddy) == HIGH) {
myservo.write(100);
}
delay(1000);
myservo.write(20);
time2();
if (digitalRead(ddu) == HIGH) {
myservo.write(100);
}
delay(1000);
myservo.write(20);
time3();
}
void time1()
{
currentTime = 2500;
}
void time2()
{
currentTime = 20000;
}
void time3()
{
currentTime = 10000;
}
which at least compiles.