Periodic led with unequal low and high time

Hello folks !
I'm actually building an airsoft replica based on an electrovanne and a paintball air tank.
The electrovanne would be controlled by a arduino uno.
So i need to have a loop that opens the valve 100 ms or so at a frequency of 6Hz, I tried using this :

char led=13;

int gachette=7;

int semi=6;

int burst=5;

int auto=4;

int count=0;

unsigned long intervalForCadence=160000;

unsigned long lastForCadence=0;

int stateOfCadence=LOW;

unsigned long intervalForOuverture=100000;

unsigned long lastForOuverture=0;

int stateOfOuverture=LOW;

void setup()

{

pinMode(led,OUTPUT);

pinMode(gachette,INPUT);

pinMode(semi,INPUT);

pinMode(burst,INPUT);

pinMode(auto,INPUT);

digitalWrite(led,LOW);

}

void loop ()

{

unsigned long time = micros();

if (digitalRead(auto)==HIGH)

{

while (digitalRead(gachette)==HIGH)

{

if (time-lastForCadence>=intervalForCadence)

{

stateOfCadence=stateOfCadence==HIGH?LOW:HIGH;

digitalWrite(led,stateOfCadence) ;

lastForCadence+=intervalForCadence ;
}

}

}

Last part of the code is missing and about single fire.

This code doesn't allow me to specify the open time, only the rate of fire, so I tried including a second time loop, but it failed :

char led=13;

int gachette=7;

int semi=6;

int burst=5;

int auto=4;

int count=0;

unsigned long intervalForCadence=160000;

unsigned long lastForCadence=0;

int stateOfCadence=LOW;

unsigned long intervalForOuverture=100000;

unsigned long lastForOuverture=0;

int stateOfOuverture=LOW;

void setup()

{

pinMode(led,OUTPUT);

pinMode(gachette,INPUT);

pinMode(semi,INPUT);

pinMode(burst,INPUT);

pinMode(auto,INPUT);

digitalWrite(led,LOW);

}

void loop ()

{

unsigned long time = micros();

if (digitalRead(auto)==HIGH)

{

while (digitalRead(gachette)==HIGH)

{

if (time-lastForCadence>=intervalForCadence)

{

stateOfCadence=stateOfCadence==HIGH?LOW:HIGH;

lastForCadence+=intervalForCadence;

if (time-lastForOuverture>=intervalForOuverture)

{

stateOfOuverture=stateOfOuverture==HIGH?LOW:HIGH;

digitalWrite(led,stateOfOuverture);

lastForOuverture+=intervalForOuverture;

}

}

}

}

Is it the good idea and just a syntax problem ?

Many thanks in advance for your help

Some suggestions
Remove the unnecessary blank lines in your code to make it easier to read
Use Auto Format in the IDE
Post your code using code tags (</> above the editor window) to make it easier to read here
Change the name of the auto variable to something else. It is causing problems.
Check carefully that each opening brace has a corresponding closing brace. If you double click after an opening brace then the code enclosed in the pair of braces will be highlighted. Try it with the opening brace of the loop() function and you will see a problem.

auto