lvalue required as left operand of assignment

Im new to programing and I just wrote this code but I don’t know what wrong. The error message is…

Bummber_Test.ino: In function ‘void loop()’:
Bummber_Test:22: error: lvalue required as left operand of assignment
Bummber_Test:22: error: lvalue required as left operand of assignment
Multiple libraries were found for “AFMotor.h”
Used: C:\Program Files (x86)\Arduino\libraries\AFMotor
Not used: C:\Users\Blade\Documents\Arduino\libraries\Adafruit_Motor
lvalue required as left operand of assignment

Code is listed below as well

#include <AFMotor.h>

AF_DCMotor motorD(4);
AF_DCMotor motorC(3);
AF_DCMotor motorB(2);
AF_DCMotor motorA(1);

int analogPinL = 15;
int analogPinR = 14;


void setup() {
  motorD.setSpeed(150);
  motorC.setSpeed(150);
  motorB.setSpeed(150);
  motorA.setSpeed(150);
  
}

void loop()
{
  if ((analogRead(analogPinL)= 1023)||(analogRead(analogPinR)= 1023))
  {
  motorD.run(RELEASE);
  motorC.run(RELEASE);
  motorB.run(RELEASE);
  motorA.run(RELEASE);
  delay(100);
  motorD.run(BACKWARD);
  motorC.run(BACKWARD);
  motorB.run(BACKWARD);
  motorA.run(BACKWARD);
  delay(1000);
  motorD.run(BACKWARD);
  motorC.run(FORWARD);
  motorB.run(FORWARD);
  motorA.run(BACKWARD);
  delay(750);
  }
  else
  {
  motorD.run(FORWARD);
  motorC.run(FORWARD);
  motorB.run(FORWARD);
  motorA.run(FORWARD);
  delay(500);
  }
}
  if ((analogRead(analogPinL)= 1023)||(analogRead(analogPinR)= 1023))

Too few equals.

if (x = 5) assigns "5" to the variable "x" and is always true. if (x == 5) tests to see if "x" has the value of "5" and returns true if they match. My favorite booboo (it has to be - I have done it so many times :confused: )

analogRead(analogPinL)= 1023

Your trying to assign a vaule to a function - you can't.

Mark