Invalid Header File TinkerCad

This is my first tinkercad arduino uno program and I am trying to build a temperature alert system. I ran the following program and it gives errors saying, "invalid header file" .
Can anyone help me solve it? Many Thanks.

#include<SoftwareSerial.h>
#include<LiquidCrystal.h>

LiquidCrystal lcd(12,11,5,4,3,2); //connecting the pins rs,en,d4,d5,d6,d7 to the arduino at pin 12 11 5 4 3 2

int celsius; //declare a function celsius as an integer

void setup()
{
  pinMode(A0,INPUT)
  pinMode(7,OUTPUT)
  Serial.begin(9600); //set the baud rate at 9600 bits per secon
  lcd.begin(16,2); //lcd size is 16x2 // Print a message to the LCD
  lcd.print("Temp Display");
  Serial.println("Temp Display"); //print the message at the serial monitor
}

void loop()
{
  celsius = map(((analogRead(A0)—20) * 3.04), 0, 1023, -40, 125); //map to obtain temperature mathematically.Meaning 0 = -40degrees and 1023 = 125degrees

  lcd.setCursor(0,0); //cursor set to the first pixel of the lcd.

  lcd.print("Temp Display"); //print message to lcd

  lcd.setCursor(0, 1); //cursor set to the second line first pixel

  lcd.print(celsius); //prints the celsius output from the analog read onto the lcd at 0,1

  lcd.print("C"); //print alphabet “c”

  Serial.println(celsius); //output shown in the serial monitor

  delay(1000); //reading refreshes every 1 second

  lcd.clear(); //clears the lcd

  if (celsius > 50)
  {
    digitalWrite(7, 1);
    tone (7, 250, 100);
    delay(100);
    lcd.setCursor(8, 1);
    lcd.print("Too HOT");
  }
  else if (celsius < 50 && celsius >= 15)
  {
    digitalWrite(7, 0);
    lcd.setCursor(8, 1);
    lcd.print("Normal");
  }
  else if (celsius < 15)
  {
    digitalWrite(7, 0);
    lcd.setCursor(8, 1);
    lcd.print("Cold");
  }

}

Welcome to the forum

"invalid header file" - is that the full error message ? Has TinkerCad got access to those libraries ?

Yes. It is the only error. See below image.
Yes. I imported libraries. Tinkercad can access them.

Please do not post pictures of part of tour sketch

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

What happens if you compile the code in the Arduino IDE ?

Why would Tinkercad have a SoftwareSerial library ? Remove that include.
Put a ';' at the end of a statement.

  pinMode(A0,INPUT)     // missing a '; 
  pinMode(7,OUTPUT)     // missing a ';'

The line with the map() is too complex and has a weird character, use more variables.

  // map to obtain temperature mathematically.
  // Meaning 0 = -40 degrees and 1023 = 125 degrees
  int rawADC = analogRead(A0);
  int t = (int) ((rawADC - 20) * 3.04);
  celsius = map(t, 0, 1023, -40, 125); 

and then it compiles in Tinkercad.

Thank you. Yes it is the solution.

I faced the same error for my project a while ago. The problem is that some libraries use begin() to initialize the display while some uses init(). So, in future ill suggest to try and use both the above functions to resolve the error.

hi, i'm having the same problem.
the following code won't compile, it is also in tinkercad.

// C++ code
//
#include <Adafruit_LiquidCrystal.h>

int buttonState = 0;

String namen[] = {"jef", "matthew"};

Adafruit_LiquidCrystal lcd_1(0);

void setup()
{
  lcd_1.begin(16, 2);
  pinMode(4, INPUT);
  lcd_1.setCursor(0, 1);
  lcd_1.print(namen[0]);
}

void loop()
{
  // backlight
  lcd_1.setBacklight(1);
  // make the buttonstate the digital pin
  buttonState = digitalRead(4);
  if (buttonState == HIGH) {
    // set lcd position
    lcd_1.setCursor(0, 0);
    // print to LCD
    lcd_1.print("ON ");
  } else {
    lcd_1.setCursor(0, 0);
    lcd_1.print("OFF");
  }
}

thanks a lot in advance

@wigglebabbo You should have started your own topic.
Your code in Tinkercad does compile:

Topic closed.
If you have 'the same problem' then you don't need to ask it here because it's already been answered. Adding your own questions to other people's topics is against the forum rules and can result in a ban from the forum. If you have a different problem then it is nothing to do with this topic, create your own topic and ask your question.

Please read the forum guide first:

@raman_noodels
@jendoubi_ali
@rahim-rahimi
@edmupo

Your questions deleted, if you still want to ask then create your own topic with your question please.