Errors regarding expected tokens

Hello,
While am trying to program my arduino, i got many errors. This is my code:

#include <Servo.h>
int servopinA = 9;
int servopinB = 10;
int servopinC = 11;
int servopinD = 12;
int servopinE = 13;
int i=0;
int j=90;
int k=0;
Servo myservoA;
Servo myservoB;
Servo myservoC;
Servo myservoD;
Servo myservoE;
void setup() {
myservoA.attach(servopinA);
myservoB.attach(servopinB);
myservoC.attach(servopinC);
myservoD.attach(servopinD);
myservoE.attach(servopinE);
}
void loop() {
for((i=0&&j=90&&k=0;j<180&&i<180&&k<180;i++&&j++&&k++)||(k=180&&i=180&&j=180;i>0&&k>0&&j>90;i--&&k--&&j--))
{
myservoA.write(i) ;
myservoC.write(i);
myservoB.write(j);
myservoD.write(j);
myservoE.write(k);
delay(5);
}
}

I got errors like

Arduino: 1.6.0 (Windows 8), Board: "Arduino Uno"

swimming_oct18a.ino: In function 'void loop()':
swimming_oct18a.ino:23:20: error: lvalue required as left operand of assignment
swimming_oct18a.ino:23:22: error: expected ')' before ';' token
swimming_oct18a.ino:23:43: error: expected primary-expression before ';' token
swimming_oct18a.ino:23:43: error: expected ')' before ';' token
swimming_oct18a.ino:23:57: error: expected ';' before ')' token
swimming_oct18a.ino:23:110: error: expected ';' before ')' token
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Can you please tell me what these errors are about, I could not figure out what these are. Thank you.

What in the world were you trying to do with the line

for((i=0&&j=90&&k=0;j<180&&i<180&&k<180;i++&&j++&&k++)||(k=180&&i=180&&j=180;i>0&&k>0&&j>90;i--&&k--&&j--))

?

What in the world were you trying to do with the line

Isn't that obvious? Sheesh, I thought everyone could see that!

Clearly, OP is trying to induce the compiler to complain bitterly. It worked, didn't it?

I have no idea what that line of code is trying to do, but to at least provide some insight, let's look at the Errors themselves...

swimming_oct18a.ino is the Name of your sketch.
Things like "23:20" are the line and column where the error occured.
23:22: error: expected ')' before ';' token says that at line 23, column 22, a ";" was encountered before the expected ")" was encountered. (Because you opened a parenthesis, didn't Close the parenthesis, but issued a semicolon to end the Statement...

I suspect that you were trying to do something with multiple variables simultaneously. This can be done using comma where you are using &&.

So for(i=0, j=90, k=0; ... might make sense.

j < 180 && i < 180 && k < 180 is ambiguous but (j < 180) && (i y 180) && (k < 180) might make sense (except that because j starts at 90, it will reach 180 Long before any of the others).

For all I care, || (k=180) may be fine, but then again, why not just use k <= 180?

If you start at 0 or 90 and want to stop at 180, why are you decrementing the values with --? Are you really relying on some sort of rollover or did you just mix up increment and decrement?

  for (
    (i=0&&j=90&&k=0;j<180&&i<180&&k<180;i++&&j++&&k++)
    ||
    (k=180&&i=180&&j=180;i>0&&k>0&&j>90;i--&&k--&&j--)    )

You can't put two sets of parameters on a single 'for' loop. You will have to use separate loops.

It looks like the intent is to have all of the servos sweeping back and forth but not the same range of positions:
i: 0 to 180 to 0
j: 90 to 180 to 90
k: 0 to 180 to 0 (same as i)

It is not clear if the shorter range (j) is supposed to happen in the same time (moving slower) or at the same speed (sweeping twice as often). In either case this can't be done by trying to make a single 'for' loop do everything magically.

A good start would be to have variables to keep track of which direction each sweep is moving. Then add statements to change direction at the limits of the sweep:

int direction_i = 1, direction_j = 1;
int i=0, j=0;

void loop () {
if (direction_i == 1 && i >= 180) 
    direction_i = -1;

if (direction_i == -1 && i == 0) 
    direction_i = 1;

i += direction_i;

if (direction_j == 1 && j >= 180) 
    direction_j = -1;

if (direction_j == -1 && j <= 90) 
    direction_j = 1;

j += direction_j;

    myservoA.write(i);
    myservoB.write(j);
    myservoC.write(i);
    myservoD.write(j);
    myservoE.write(i);
    delay(5);
}

PaulMurrayCbr:
'=' ≠ '=='

In the code, the = occurs in the initialization block, where it is correct.

i=0&&j=90&&k=0

assignment has a lower precedence than the logic operators, so this is parsed as

i=(0&&j)=(90&&k)=0

'90 && k' is not something that you can assign a value to. It is not an lvalue.

Once you have fixed that, your next problem will be that this

(i=0)&&(j=90)&&(k=0)

Doesn't work. (i=0) evaluates to zero, so the && operator will not evaluate the right hand side at all and will not set j and k. This is called "short-cutting', and is an important and useful feature of the language, eg if(p && !*p){/*do something*/}.

Try the comma operator:

i=0, j=90, k=0

PaulS:
In the code, the = occurs in the initialization block, where it is correct.

Argh! I deleted that post, because it was wrong, but evidently too slowly.