Error Message

I am trying to make a project where when 5volts is detected on one of 4 pins, an output pin goes high.

here is the code:Arduino:

#include <LiquidCrystal.h>

void setup(){

LiquidCrystal lcd(12, 11, 5, 4, 3, 3);
pinMode(0, INPUT);
pinMode(1, OUTPUT);
pinMode(10, INPUT);
pinMode(9, INPUT);
pinMode(8, INPUT);

}

void loop(){

digitalRead (0, HIGH);
lcd.print("MOTION IN HALL");

digitalRead(10, HIGH)
lcd.print("MOTION IN LOUNGE");

digitalRead(9, HIGH);
lcd.print("MOTION IN STUDY");

digitalRead(8, HIGH);
lcd.print("MOTION IN EATERY");
}

digitalRead(0, 10, 9, 8, HIGH);
digitalWrite(1, HIGH);
}
}

And here is the error:

sketch_jun14a:25: error: at this point in file
sketch_jun14a.ino: At global scope:
sketch_jun14a:30: error: expected constructor, destructor, or type conversion before '(' token
sketch_jun14a:31: error: expected constructor, destructor, or type conversion before '(' token
sketch_jun14a:32: error: expected declaration before '}' token

Your LCD should have global scope - it's useless with scope limited to setup()
Please use code tags when posting code.

digitalRead (0, HIGH);

is no Arduino statement

int x = digitalRead (0); // x can be HIGH or LOW

or you mean

digitalWrite (0, HIGH);

furthermore

LiquidCrystal lcd(12, 11, 5, 4, 3, 3);

should be before setup()

a few brackets too much

using pin 0 and 1 is not a good idea as they are the serial port

WHich version of the IDE are you using?

LiquidCrystal lcd(12, 11, 5, 4, 3, 3);

should be

LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // last digit

Programming is working very (100%) accurate otherwise bugs will hunt you :wink:

OK, you should try this, and extend it to your needs

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup()
{
  pinMode(8, INPUT);
  pinMode(9, INPUT);
  pinMode(10, INPUT);
}


void loop()
{
  if (digitalRead(8) == HIGH)
  {
    lcd.print("MOTION IN EATERY");
  }


  delay(10000);
}

please use [code]...[/code] tags next time

digitalRead(0, 10, 9, 8, HIGH);

This line also makes no sense.

It is also probably not a good idea to use pin 0 and pin 1, unless you are aware of the consequences.