how i put string value from BH1750 -light sensor to if else condition?

working code :

uint16_t lux = lightMeter.readLightLevel();
lcd.print("Int=" + (String)lux + " lux   ");

what i mean to put there:

 if (digitalRead((String)lux) <= (1200))
    { finished = millis();
    stop millis();
    stop count++;


    else (digitalRead((String)lux) > (120));
    { continue;
if (digitalRead((String)lux) <= (1200))

DigitalRead does not take a String as a parameter. It takes a pin number (int). Is there really a lux pin to read? DigitalRead returns a HIGH (1) or a LOW (0). So always less than 1200. Can you explain what that is supposed to do?

Maybe what you want is:

If(lux <= 1200)
else (digitalRead((String)lux) > (120));

The else structure takes no arguments.

"It takes a pin number (int)." byte. There are no pins above 255.