user47703: I am using the Arduino Uno.  I am attempting to only light a red LED when both a blue LED is on and the push button is pressed.  However, I keep receiving an error message stating too few arguments in my if statement.  I don't know whether I am simply overlooking something in my code.
The code is as follows:
int redLEDPin=7;
int blueLEDPin=3;
int redLEDOn=2000;
int redLEDOff=1000;
int blueLEDOn=2000;
int blueLEDOff=1000;
int leverR=2;

void setup() {
    pinMode(redLEDPin, OUTPUT);
    pinMode(blueLEDPin, OUTPUT);
    pinMode(leverR, INPUT);
    }

void loop() {  
    digitalWrite(blueLEDPin, HIGH);
    delay(blueLEDOn);
    digitalWrite(blueLEDPin, LOW);
    delay(blueLEDOff);
    }

  if ((digitalWrite(blueLEDPin) == HIGH) && (digitalRead(leverR) == HIGH)) {
    digitalWrite(redLEDPin, HIGH);
    delay(redLEDOn);
    digitalWrite(redLEDPin, LOW);
    delay(redLEDOff);
    }
  else
  {
    digitalWrite(redLEDPin, LOW);
  } 
}



user337: Your if statement is outside of the loop() function.
Remove the } after delay(blueLEDOff);

user47671: This is your loop() function: 
void loop() {  
    digitalWrite(blueLEDPin, HIGH);
    delay(blueLEDOn);
    digitalWrite(blueLEDPin, LOW);
    delay(blueLEDOff);
    }

Your if() statement is outside of your loop. Check your brackets. In the Arduino IDE, if you put your cursor to the right of a bracket, it will highlight which bracket corresponds to that one. 
Large Edit:
To blink two LEDs concurrently, you need to get rid of the delays. Please read about using the millis() function: https://learn.adafruit.com/multi-tasking-the-arduino-part-1/using-millis-for-timing 
I don't know how to explain this succinctly, so I am providing the code (note that the on and off times for the LEDs are equal -- if you want them on longer than they are off, you can work on that part of it): 
int redLEDPin=7;
int blueLEDPin=3;
int redLEDOn=2000;  //not used
int redLEDOff=250;
int blueLEDOn=2000;
int blueLEDOff=1000;  //not used
int leverR=2;

// the following variables are needed for timing and tracking LED state:
long previousMillisBlue = 0;
long previousMillisRed = 0;
bool ledStateBlue = LOW;
bool ledStateRed = LOW;

void setup() {
    pinMode(redLEDPin, OUTPUT);
    pinMode(blueLEDPin, OUTPUT);
    pinMode(leverR, INPUT_PULLUP); //I am using internal pullup resistor
}

void loop() {  
    unsigned long currentMillis = millis();

    if(currentMillis - previousMillisBlue > blueLEDOn) 
    {
      previousMillisBlue = currentMillis;

      if (ledStateBlue == LOW)
        {ledStateBlue = HIGH;}
      else
        {ledStateBlue = LOW;}

      digitalWrite(blueLEDPin, ledStateBlue);
    }

    //since we are tracking ledStateBlue above, we can reference it here
    if(digitalRead(leverR) == HIGH && ledStateBlue)
    {
      if(currentMillis - previousMillisRed > redLEDOff) 
      {
        previousMillisRed = currentMillis;

        if (ledStateRed == LOW)
          {ledStateRed = HIGH;}
        else
          {ledStateRed = LOW;}

        digitalWrite(redLEDPin, ledStateRed);
      }
    }
    else
    {digitalWrite(redLEDPin, LOW);}

}


user47704: The digitalWrite statement in the if statement needs a value to write. It looks like you meant digitalRead, since you're comparing the result to something and the other condition is a digitalRead.
 if ((digitalWrite(blueLEDPin) == HIGH) && (digitalRead(leverR) == HIGH)) {

vs
 if ((digitalRead(blueLEDPin) == HIGH)  && (digitalRead(leverR) == HIGH)) {


47703: <p>I am using the Arduino Uno.  I am attempting to only light a red LED when both a blue LED is on and the push button is pressed.  However, I keep receiving an error message stating too few arguments in my if statement.  I don't know whether I am simply overlooking something in my code.</p>

<p>The code is as follows:</p>

<pre><code>int redLEDPin=7;
int blueLEDPin=3;
int redLEDOn=2000;
int redLEDOff=1000;
int blueLEDOn=2000;
int blueLEDOff=1000;
int leverR=2;

void setup() {
    pinMode(redLEDPin, OUTPUT);
    pinMode(blueLEDPin, OUTPUT);
    pinMode(leverR, INPUT);
    }

void loop() {  
    digitalWrite(blueLEDPin, HIGH);
    delay(blueLEDOn);
    digitalWrite(blueLEDPin, LOW);
    delay(blueLEDOff);
    }

  if ((digitalWrite(blueLEDPin) == HIGH) &amp;&amp; (digitalRead(leverR) == HIGH)) {
    digitalWrite(redLEDPin, HIGH);
    delay(redLEDOn);
    digitalWrite(redLEDPin, LOW);
    delay(redLEDOff);
    }
  else
  {
    digitalWrite(redLEDPin, LOW);
  } 
}
</code></pre>

<p><a href="https://i.stack.imgur.com/ScQM7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ScQM7.png" alt="enter image description here"></a></p>
 337: <p>Your if statement is outside of the loop() function.</p>

<p>Remove the <code>}</code> after <code>delay(blueLEDOff);</code></p>
 47671: <p>This is your <code>loop()</code> function: </p>

<pre><code>void loop() {  
    digitalWrite(blueLEDPin, HIGH);
    delay(blueLEDOn);
    digitalWrite(blueLEDPin, LOW);
    delay(blueLEDOff);
    }
</code></pre>

<p>Your <code>if()</code> statement is outside of your loop. Check your brackets. In the Arduino IDE, if you put your cursor to the right of a bracket, it will highlight which bracket corresponds to that one. </p>

<p><em>Large Edit:</em></p>

<p>To blink two LEDs concurrently, you need to get rid of the delays. Please read about using the millis() function: <a href="https://learn.adafruit.com/multi-tasking-the-arduino-part-1/using-millis-for-timing" rel="nofollow noreferrer">https://learn.adafruit.com/multi-tasking-the-arduino-part-1/using-millis-for-timing</a> </p>

<p>I don't know how to explain this succinctly, so I am providing the code (note that the on and off times for the LEDs are equal -- if you want them on longer than they are off, you can work on that part of it): </p>

<pre><code>int redLEDPin=7;
int blueLEDPin=3;
int redLEDOn=2000;  //not used
int redLEDOff=250;
int blueLEDOn=2000;
int blueLEDOff=1000;  //not used
int leverR=2;

// the following variables are needed for timing and tracking LED state:
long previousMillisBlue = 0;
long previousMillisRed = 0;
bool ledStateBlue = LOW;
bool ledStateRed = LOW;

void setup() {
    pinMode(redLEDPin, OUTPUT);
    pinMode(blueLEDPin, OUTPUT);
    pinMode(leverR, INPUT_PULLUP); //I am using internal pullup resistor
}

void loop() {  
    unsigned long currentMillis = millis();

    if(currentMillis - previousMillisBlue &gt; blueLEDOn) 
    {
      previousMillisBlue = currentMillis;

      if (ledStateBlue == LOW)
        {ledStateBlue = HIGH;}
      else
        {ledStateBlue = LOW;}

      digitalWrite(blueLEDPin, ledStateBlue);
    }

    //since we are tracking ledStateBlue above, we can reference it here
    if(digitalRead(leverR) == HIGH &amp;&amp; ledStateBlue)
    {
      if(currentMillis - previousMillisRed &gt; redLEDOff) 
      {
        previousMillisRed = currentMillis;

        if (ledStateRed == LOW)
          {ledStateRed = HIGH;}
        else
          {ledStateRed = LOW;}

        digitalWrite(redLEDPin, ledStateRed);
      }
    }
    else
    {digitalWrite(redLEDPin, LOW);}

}
</code></pre>
 47704: <p>The digitalWrite statement in the if statement needs a value to write. It looks like you meant digitalRead, since you're comparing the result to something and the other condition is a digitalRead.</p>

<pre><code> if ((digitalWrite(blueLEDPin) == HIGH) &amp;&amp; (digitalRead(leverR) == HIGH)) {
</code></pre>

<p>vs</p>

<pre><code> if ((digitalRead(blueLEDPin) == HIGH)  &amp;&amp; (digitalRead(leverR) == HIGH)) {
</code></pre>
