Need help on project!

hi! fairly new to the arduino world. Im doing a project where I'm using 6 motion sensors to turn on 6 different incandescent lights. What I'm trying to do is to record the order from the sensors turning on and put the order in some kind of array. This array then gets to be repeated for around 10 seconds and then the array would get empty again and record another pattern from sensors turning on in a different order. I have meet with a couple of computer programmer professors, but none have real experience with arduino processor.
this is the code we came up with, but it never did work:

int val=0;
int pinrelay = 13;
int pinrelay1 = 12;
int pinrelay2 = 11;
int pinrelay3 = 10;
int pinrelay4 = 9;
int pinrelay5 = 8;
int pirsensor = 2;
int pirsensor1 = 3;
int pirsensor2 = 4;
int pirsensor3 = 5;
int pirsensor4 = 6;
int pirsensor5 = 7;

void setup()
{
  Serial.begin(9600);
  
  pinMode(2,INPUT);
  pinMode(3,INPUT);
  pinMode(4,INPUT);
  pinMode(5,INPUT);
  pinMode(6,INPUT);
  pinMode(7,INPUT);
  pinMode(13,OUTPUT);
  pinMode(12,OUTPUT);
  pinMode(11,OUTPUT);
  pinMode(10,OUTPUT);
  pinMode(9,OUTPUT);
  pinMode(8,OUTPUT);
  
}

void loop()
{
  int s;
  int x[6];
 
  for (int i=0; i < 6; i=i+1)
  //figure out what sensor is turnong on 
  {val = digitalRead(2);
  if (val == 1) 
     (s == 2);
  else {val = digitalRead(3);
  if (val == 1)
     (s == 3);
  else {val = digitalRead(4);
  if (val == 1)
     (s == 4);
  else{val = digitalRead(5);
  if (val ==1 )
     (s == 5 );
  else {val = digitalRead(6);
  if (val ==1)
     (s == 6);
  else {val = digitalRead(7);
  if (val == 1)
     (s == 7);       
  }}}}}}
 delay(10000);
  
After it didn't work i started to look up tutorial and more info on arrays and I understand a little but can understand it all, then I tried this code by time but don't know how to implement the sensor value into the hole project: 
int timer = 1000;           
  8, 13, 12, 10 };       
int pinCount = 4;         
void setup() {
  int thisPin;
  for (int thisPin = 0; thisPin < pinCount; thisPin++)  {
    pinMode(relay[thisPin], OUTPUT);      
  }
}

void loop() {
  for (int thisPin = 0; thisPin < pinCount; thisPin++) { 
    digitalWrite(relay[thisPin], HIGH);   
    delay(timer);                   
    digitalWrite(relay[thisPin], LOW);    

  }
  for (int thisPin = pinCount - 1; thisPin >= 0; thisPin--) { 
    digitalWrite(relay[thisPin], HIGH);
    delay(timer);
    digitalWrite(relay[thisPin], LOW);
  }
}

any info that can help me in this project?? 
 
   {for (int i = 5; i >= 0; i=i-1)
 { s=x[i]; 
 if(s==2)
 digitalWrite(13,HIGH);
 else if (s==3)
 digitalWrite(12,HIGH);
 else if (s==4)
 digitalWrite(11,HIGH);
 else if (s==5)
 digitalWrite(10,HIGH);
 else if (s==6)
 digitalWrite(9,HIGH);
 else if (s==7)
 digitalWrite(8,HIGH);
 delay(1000);}}
 delay(1500);
 }

Moderator edit:
</mark> <mark>[code]</mark> <mark>

</mark> <mark>[/code]</mark> <mark>
tags added.

if (val == 1)
     (s == 2);

is wrong, you probably mean

if (val == 1)
     (s = 2);

== is a compare
= is a assignment


and, please use the #button to get proper tagging around your code, it does not run better but it looks so much better (easier to debug)
Thanks,

Thanks will definitely try it when I get home!