error with blink

heey I have been trying to make a program like blink. But now I want to let it blink with a faster to slower interval. This is the code I have made but I do not know how to solve the error.

int led = 13; 

void setup() {
pinMode(led, OUTPUT); 
}

void loop() {
  for(int i=1; i<250; i=i+25)
  digitalWrite(13, HIGH);
  delay(i);
  digitalWrite(13, LOW);
  delay(i);
}

can one of you help me out whit this

Look carefully at the for loop. How many lines of code will be executed each time through the for loop ?

Reformatting the code may help give you the answer

void loop() 
{
  for (int i = 1; i < 250; i = i + 25)
    digitalWrite(13, HIGH);
  delay(i);
  digitalWrite(13, LOW);
  delay(i);
}

Put the code to be executed each time through the for loop in braces.

The error comes about because the for loop will only execute over the next block of code, the variable i goes out of scope right after the next line of code, as the semicolon ; will terminate the block.

Use the braces like UKHeliBob points out to create a block that includes all the lines you wish to execute during the for loop iterations.