Help needed programing 2 inputs with 2 outputs

I'm new to Arduino and programing in general. I've had it about 3 weeks and have already made a proximity alarm and a laser trip wire (I know it's nothing very advance but I'm proud of it LOL). I understand how to write basic single input and single output code, but I'm having trouble writing one where I have 2 inputs and 2 outputs. My son was using the laser tripwire alarm while playing an Airsoft capture the flag game, but it kept going off when he would relaunch and alert the other team. He asked me to see if there was a way to have an arming device so he could arm it as they left the base. I purchased an IR remote/receiver module and an SCR to arm the buzzer. The issue I'm running into is the coding. I've been researching and going at it for several days but continue to get an error message. Here are the 2 ways I've written the code but with basically the same error. Any help in understanding what I'm doing wrong would be GREATLY appreciated. Thank you in advance.

void setup() {
 
 pinMode(2, INPUT); //Pin 2 as INPUT

  pinMode(3, OUTPUT); //PIN 3 as OUTPUT

  pinMode(4, INPUT); //PIN 4 as INPUT

  pinMode(5, OUTPUT); //PIN 5 as OUTPUT 


}

void loop() {

  
  if (digitalRead(2) == HIGH) // check if PIR is triggered.

  if (digitalRead(4) == HIGH) // check if IR switch is triggered

  {

  digitalWrite(3, HIGH);   // turn the LED/Buzz ON

  delay(1000);                       // wait for 100 msecond

  digitalWrite(3, LOW);   // turn the LED/Buzz OFF

  digitalWrite(5, HIGH); // TURN ON LED close circuit

    delay(1000);   

    digitalWrite(5, LOW); // DISARM
 

}
void setup() {

  pinMode(2, INPUT); //Pin 2 as INPUT

  pinMode(3, OUTPUT); //PIN 3 as OUTPUT

  

  
}  


  
  void loop() {


  if (digitalRead(2) == HIGH) // check if photoresistor is triggered.

  {

  digitalWrite(3, HIGH);   // turn the Buzz ON

  delay(1000);                       // wait for 100 msecond

  digitalWrite(3, LOW);   // turn the Buzz OFF

                       // wait for 100 msecond

  

  void setup() {

    pinMode(4, INPUT); //Pin 2 as INPUT

    pinMode(5, OUTPUT); //PIN 3 as OUTPUT

  
  


 


void loop() {

  if (digitalRead(4) == HIGH) // check if photoresistor is triggered.

  {

  digitalWrite(5, HIGH);   // turn the Buzz ON

  delay(1000);                       // wait for 100 msecond

  digitalWrite(5, LOW);   // turn the Buzz OFF

                       // wait for 100 msecond

  }

The first one seems closer to what you want. But I think the first 2 lines in loop() are your problem. If either being HIGH is what you're looking for it's

if (digitalRead(2) == HIGH || digitalRead(4) == HIGH)

Or if both need to be HIGH

if (digitalRead(2) == HIGH && digitalRead(4) == HIGH)

Thanks for the help, but still the same error message. Is there anything else that jumps out at you as being wrong? I’ve copied and pasted the error code below.

 Users/TheDell/Documents/Arduino/TEST_LASERALARMTEST_ARMED.ino: In function 'void loop()':
TEST_ARMED:34:1: error: expected '}' at end of input
 }
 ^
exit status 1
expected '}' at end of input

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

That's telling you there is a missing }.

Hit cntr+t

For every { there needs to be a closing }

There's nothing "wrong" with your two if statements. It will compile and run. It's the same as the example that Danger suggested, and for a C++ programmer (I.E. Arduino), the && is more readable.

Use CTRL-T to clean up your code, then put your cursor on each opening {. The corresponding closing } will be highlighted by the IDE.

When I added your missing { it compiles fine.

GOT IT WORKING!! Thanks a million gentlemen I really appreciate it. Heres the code incase anyone who reads this thread in the future is interested.

void setup() {
 
 pinMode(2, INPUT); //Pin 2 as INPUT

  pinMode(3, OUTPUT); //PIN 3 as OUTPUT

  pinMode(4, INPUT); //PIN 4 as INPUT

  pinMode(5, OUTPUT); //PIN 5 as OUTPUT 

}

void loop() {

  
   (digitalRead(2) == HIGH && digitalRead(4) == HIGH)
  


  ;digitalWrite(3, HIGH);   // turn the LED/Buzz ON

  delay(1000);                       // wait for 100 msecond

  digitalWrite(3, LOW);   // turn the LED/Buzz OFF

  digitalWrite(5, HIGH); // TURN ON LED close circuit

    delay(1000);   

    digitalWrite(5, LOW); // DISARM
 

}