My first real project

Hello i'll start by saying I love this place because of all the information available and the fact that so many give there time to help others like me.
I have been searching for a solution to my problem but can't seem to locate my error.
I am a complete noob as you'll see by my 130 if else statements.
My problem is is that once I compile and upload it goes right into the first loop. When I was hoping to have all 3 arguments met before starting, then the loop just keeps repeating (Maybe a BREAK statement)??
This is what it jumps to when I would like rel HIGH then delay Then rel LOW then stop and go to the for loop and run only once

void setState (int i)
{
   if ((scrPer == 1) && (scrTime==1)&& digitalRead(BUTTON3==HIGH))
{
      digitalWrite (rel,HIGH);
      delay (1150);
      digitalWrite (rel,LOW);
}
      
        for (i=0;i<255;i+=25) // increments 
        {
           analogWrite (sol,i);
           delay (75); //Ramp up over time
        }

I still have to adjust delay settings but am trying to get my head around this problem before adding anything more. I apologize for the noob question and for the size of the post. I am attempting to attach my full sketch as well
Thanks for your time

today.ino (30.3 KB)

digitalRead(BUTTON3==HIGH)
:wink:

WOW Thanks for the fast reply.
I will lose the digitalRead and retry....