problems in a code for a dual servo programme =( plzz help

heyyy all,
can anyone please help me with my code for the dual servo control project ,it doesn't work code gives a controlling error i cant figure it out =(

#include<servo.h>

char buffer[10];
Servo servo1;
Servo servo2;

void setup()
{
  servo1.attach(5);
  servo2.attach(6);
  Serial.begin(9600);
  Serial.flush();
  servo1.write(90);
  servo2.write(90);
  Sreial.println("starting...");
  
}

void loop()

{
  if(Serial.available()>0)
  
  {
    int index=0;
    delay(100);
    int numChar = Serial.available();
    if (numChar>10)
    {
      numChar=10;
    }
      while(numChar--)
{   
buffer{index++}= Serial.read();
}
splitString(buffer);

  }
  
}

void splitString(char*data)
{
  Serial.print("data entered....");
  Serial.println(data);
  char*parameter;
  parameter = strtok(data,",");
  while(parameter != null)
  
  { 
    setServo(parameter);
    parameter= strtok (NULL,",");
  }
  
  for (int x=0,x <9 ,x++)
  {
    buffer[x]='\0';
    
  }
  Serial.flush();
  
}

}
void setsServo(char*data)
{
  
  if((data[0]=='L')||(data[0] =='1'))
  
 {
   int firstVal = strtol(data+1,NULL,10);
   firstVal = constrain(firstVal,0,180);
   servo1.write(firstVal);
   Serial.print("servo1 is set to ...");
   Serial.println(firstVal);
   
 }
  if((data[0]=='R')||(data[0] =='r'))
  
 {
   int secondVal = strtol(data+1,NULL,10);
   firstVal = constrain(secondVal,0,180);
   servo2.write(secondVal);
   Serial.print("servo2 is set to ...");
   Serial.println(secondVal);
   
 }
 
}

I'm pretty stuck
thanks a bunch!

Is your buffer long enough for the data and the terminator?

for (int x=0,x <9 ,x++)

Really?
http://arduino.cc/en/Reference/For

code gives a controlling error

Did you mean a compiler error?

Maybe spell-check the rest of your code.
Pay attention to capitals where there should be capitals ("servo.h: No such file or directory"), brackets where there should be brackets ("buffer{index++}= ") etc.

On my Mac it didn't like the name <servo.h> and insisted on <Servo.h>.

On line 14, "Serial" is spelled wrong.

On line 61 you're trying to use curly braces to index into 'buffer'. Must be square braces.

In the function splitString the value 'null' is not defined.

You call the function 'setsServo' but declare 'setservo'.

You seem to have an extra close-bracket between splitSting and setServo

Inside setServo() you declare firstVal inside one block and tr to use it in a different block.

You are testing to see that there is at least one character to read, then reading up to 11 of the 1 available. Do you see a problem with that?

You are passing strtok() an array of characters, when it expects a string. The difference is that a string is an array of characters THAT IS NULL TERMINATED. You do not NULL terminate your array. Do you know why that could be a problem?

  Serial.flush();

Do you know what this function does? Do you know why using it is generally a bad idea?

  for (int x=0,x <9 ,x++)

Clauses in a for loop are separated by ;, not commas. The comma serves a different purpose in a for loop.

Just what are you attempting to do with your servos?

Cross-posts merged.
@OP: Please do not cross-post the same question - it just wastes time, and makes me .... cross