Serial Communication - error: expected primary-expression before '[' token

I have fixed most of my errors for this code however this one error keeps stumping me:

sketch_mar07a.ino: In function 'void loop()':
sketch_mar07a:12: error: expected primary-expression before ',' token
sketch_mar07a:14: error: expected primary-expression before '[' token
sketch_mar07a:16: error: expected primary-expression before '[' token
sketch_mar07a:18: error: expected primary-expression before '[' token
sketch_mar07a:20: error: expected primary-expression before '[' token
sketch_mar07a:30: error: 'FRAME_LEN' was not declared in this scope

I have read different posts on this but none of them seem to make a whole lot of sense to me as I am a beginner. Am I using readBytesUntil() incorrectly? Or am I missing something else? The code acts as if something is missing in between the comma and byte.

void setup(){
    unsigned long ltime;      
    ltime = millis();
void loop(){;
   int right_V = A1;
    int right_H = A0;
   int left_V = A2;
   int left_H = A3;
   int Buttons = A4;
  // Serial.readBytesUntil(byte[pt],8);
      int i=0;
    if(i > 10){

   pinMode(right_V, OUTPUT);            // sets the Analog pin to output
  if (right_V != 128){
      analogWrite(A1, (right_V + 128));
    pinMode(right_H, OUTPUT);          
  if (right_H != 128){
      analogWrite(A0, (right_H + 128));
     pinMode(left_V, OUTPUT);         
  if (left_V != 128){
      analogWrite(A2, (left_V + 128));
      pinMode(left_H, OUTPUT);
  if (left_H != 128){
      analogWrite(A3, (left_H + 128));

  if (Buttons == 64){
    analogWrite(A4, 10);
    pinMode(Buttons, OUTPUT); 
  if (Buttons == 128){
    analogWrite(A4, -10);

Your use of Serial.readBytesUntil is wrong. Read

The error messages are telling that your first error is on line 12.

You need to do some serious reading and studying of the examples provided with the IDE.
There's so much wrong with this code that it's hard to know where to start.
Clearly, you've also only posted part of the code and not all of it.

Perhaps if you post all of the code, along with a clear description of what you want it to do, someone might be able to help get you on the right track.

A schematic diagram of all connections, along with links to any external modules etc, would also be useful. Currently, it's not even possible to tell what your program is supposed to do.
And believe me, this is far from true:-

I have fixed most of my errors for this code

You' haven't even scratched the surface, I'm afraid.

I never really like the reference material. Just trying to explain in a different way.

Serial.readBytesUntil reads characters till it find a specified character (the first parameter) or till it has read a number of characters (the third parameter) into a buffer.

Using serial monitor, you can specify the line ending. If you set it to e.g. newline, the first parameter will be '\n'.
The buffer can be a character array; you can declare a character buffer with e.g. char mydata[10]. I'm not quite sure what you were trying to do in your code with that.

And for the last parameter you specify the length.

void loop()
  char mydata[10];;
  int right_V = A1;
  Serial.readBytesUntil('\n', mydata, 8);

Notes / questions:

  1. you use a but never use the data. Why?
  2. what is int right_V = A1 supposed to do? It currently assigns the value A1 to the variable right_V; I doubt that that is what you want to achieve; you probably need to read up on analogRead

I suggest that you buy a book on C (not C++) and start with the basics of the language; if you already have one, read it :wink:
Next you should work through the examples that came with the IDE and understand them fully. If you don't understand them, ask. Don't be shy, we will try to explain.
Next you might want to read serial input basics