creating an if statement arduino morse decoder (need help)

i am doing an arduino decoder project where morse code is entered as a text string such as ".-" for "A" through the serial monitor and getting A printed on the lcd but, i'm getting errors and i don't understand how to fix it

#include <LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

void setup() 
{  lcd.begin(16, 2);
  Serial.begin(9600);
}

 char schar[2];

void loop()
{
  if (Serial.available())
  {
    schar = Serial.read();
    Serial.write(schar);
    
    if (schar == ".-")
    {
    Serial.write("A");
    lcd.print("a");
} 
    else 
{
  lcd.print(" ");

  }
 }
}

my errors are

morse_decoder.ino: In function 'void loop()':
morse_decoder:15: error: incompatible types in assignment of 'int' to 'char [2]' [/code ]

Serial.read() only reads a single byte. You're treating it as if it's reading an entire string. Your variable schar is too small for most morse strings anyhow. It's just 2 bytes long, whereas morse goes upto at least 6 characters long and you should also allow a 0 terminator. I recon if you make it 8 bytes long you'll be closer but you also need to have a method to input those characters one at a time.

i'm still new to this coding and only understood some parts of your explanation

what can i use to read more than 1 byte

xxxevil:
what can i use to read more than 1 byte

Serial.readUntil()

xxxevil:
what can i use to read more than 1 byte

If you are sending the .-.- characters from the Arduino Serial Monitor you can keep reading and saving characters until a Carriage Return character is received to mark the end of the sequence.

...R