Error compiling code for Arduino Uno

while (xAcceleration <= 2000)
{
analogRead;
}

  1. This is syntactically incorrect - if you're trying to call analogRead() you need to put the parens after it - like any other function call - and pass it a pin number.

  2. It's an infinite loop, since xAcceleration will never be updated inside the loop. Did you intend to take a reading with the accelerometer and update xAcceleration with it instead?

  3. There is no loop() function. All arduino sketches must have one.

  4. rand_light and acceleration call eachother. If they were ever kicked off, they would recursively call eachother until the call stack filled up available memory space. Instead, you should call them from loop(), so that each one is finishing before the other is called, eg:

void loop() {
rand_light();
acceleration();
}
  1. You posted code but didn't use code tags, this annoys the people who answer questions here. Since you aren't paying us to help you, you should try to make our lives easier and not annoy us.