problems reading data from Processing in arduino

hello Grumpy_mike,

thanks for the reply.
the Data that is being sent by processing is correct. In my arduino code i first had this code which was reading in all the data and returning it correctly:

void serialEvent() 
{
  if(Serial.available() >17)
  {
   Serial.readBytesUntil('\n',input, 18)
  }
for(int i = 0; i <18; i++)
{
    Serial.write(input[i]);
}
}

which was being read in by processing with this code:

byte[] inbuffer = new byte[18]; 
 while(port.available() >18)
 {
   inbuffer = port.readBytes();
   port.readBytesUntil('\n',inbuffer);
   if(inbuffer != null)
   {
     String myString = new String(inbuffer);
     println(myString);
   }
   println("test:");
  }

but my problem is not sending the data to the arduino, as i have had that working. Im having issues manipulating the data i get in the arduino so i can use that data to control my servo's.