If and error

I have a line of code causing an error

Using library SoftwareSerial at version 1.0 in folder: C:\Program Files\Arduino\hardware\arduino\avr\libraries\SoftwareSerial
exit status 1
lvalue required as left operand of assignment

I am trying to run code if there is a value in an int flag named AB. If AB=0 then code runs and then AB is made = 1 so next time it will not pass code.

I then will have code to sort then rest out, it's just how I can build this && line of code.

AB is declared as -

int AB = 0;

if (digitalRead(pins[x] == HIGH && AB = 0) { 
        mySerial.println (MyArray[x]);

digitalRead(pins[x]) == HIGH && AB == 0perhaps?

Many thanks, so easy when you know how. Regards