IR Output help

Hello, I connected RFID, LCD, SERVO (ignore this), and i connected everything right and it works. Now I have the problem, as you see at the very end of the code there is if statement checking if specific signal is received, it doesn’t work, Can you Help me?

#include <IRremote.h>
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>
#include <LiquidCrystal.h>
const int RECV_PIN = A1;
IRrecv irrecv(RECV_PIN);
decode_results results;
#define SS_PIN 10
#define RST_PIN 9
#define SERVO_PIN 8

Servo myservo;
 // GREEN CABLE +UP = 5V    RED-BLACK CABLE +UP = GND
 
 
#define ACCESS_DELAY 2000
#define DENIED_DELAY 1000
MFRC522 mfrc522(SS_PIN, RST_PIN);   // Create MFRC522 instance.
const int rs = 7, en = 6, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
 
 
void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn();
  irrecv.blink13(true);
  myservo.attach(SERVO_PIN);
  myservo.write( 70 );
  lcd.begin(16, 2);
  Serial.begin(9600);   // Initiate a serial communication
  SPI.begin();          // Initiate  SPI bus
  mfrc522.PCD_Init();   // Initiate MFRC522
  Serial.println("Put your card to the reader...");
  Serial.println();
  lcd.setCursor(0, 0);
  lcd.print("Loading");
  delay(500);
  // print the number of seconds since reset:
  lcd.clear();
  lcd.print("Loading.");
  delay(500);
  lcd.clear();
  lcd.print("Loading..");
  delay(500);
  lcd.clear();
  lcd.print("Loading...");
  delay(500);
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("Loading");
  delay(500);
  // print the number of seconds since reset:
  lcd.clear();
  lcd.print("Loading.");
  delay(500);
  lcd.clear();
  lcd.print("Loading..");
  delay(500);
  lcd.clear();
  lcd.print("Loading...");
  delay(500);
  lcd.clear();
  lcd.print("Enter your Card.");
  myservo.write( 1 );
}
void loop()
{
  if (irrecv.decode(&results)){
        Serial.println(results.value, HEX);
        irrecv.resume();
  }
  // Look for new cards
  if ( ! mfrc522.PICC_IsNewCardPresent())
  {
    return;
  }
  // Select one of the cards
  if ( ! mfrc522.PICC_ReadCardSerial())
  {
    return;
  }
  //Show UID on serial monitor
  Serial.print("UID tag :");
  String content = "";
  byte letter;
  for (byte i = 0; i < mfrc522.uid.size; i++)
  {
    Serial.print(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " ");
    Serial.print(mfrc522.uid.uidByte[i], HEX);
    content.concat(String(mfrc522.uid.uidByte[i] < 0x10 ? " 0" : " "));
    content.concat(String(mfrc522.uid.uidByte[i], HEX));
  }
  Serial.println();
  Serial.print("Message : ");
  content.toUpperCase();
  if (content.substring(1) == "BA 41 82 3B") //change here the UID of the card
  {
    Serial.println("Authorized access.");
    Serial.println();
    lcd.clear();
    lcd.setCursor(0, 2);
    lcd.write("  Authorized!");
    myservo.write( 70 );
    delay(7500);
    myservo.write( 1 );
    lcd.clear();
    lcd.write("Enter your Card.");
 
  }
 
  else   {
    Serial.println(" Access denied");
    lcd.clear();
    lcd.setCursor(0, 2);
    lcd.write(" Access Denied.");
    delay(1500);
    lcd.clear();
    lcd.write("Enter your Card.");
    delay(DENIED_DELAY);
 
 
  } // starting from here
  if (irrecv.decode(&results)) {
    if ((results.value, HEX) == "FFA857" {
    lcd.clear();
    lcd.write("code 1");
    irrecv.resume();
  }
}
}
   if ((results.value, HEX) == "FFA857"

I don't somehow think that results.value is a string, nor should you invent syntax in an attempt to convert it into HEX

Try this

   if (results.value == 0xFFA857)

UKHeliBob:

   if ((results.value, HEX) == "FFA857"

I don't somehow think that results.value is a string, nor should you invent syntax in an attempt to convert it into HEX

Try this

   if (results.value == 0xFFA857)

Yeah, you're right but non-converted codes looks like - 1468455
tried to work but looks like no effect

  if (irrecv.decode(&results)) {
    if (results.value == 16754775) {
    lcd.clear();
    lcd.write("code 1");
    irrecv.resume();

EDIT: Fixed code - thank you! You helped me alot!

you're right but non-converted codes looks like - 1468455

1468455 is in decimal
0xFFA857 is the same number expressed in Hex

The compiler doesn't care as it sees it in binary (0b1111 1111 1010 1000 0101 0111‬) anyway