What is wrong with my movement script?

I am new to coding and trying it out on unity I thought I would start with a movement script and I keep getting the error CS1002 ; expected, and I was watching a tutorial and followed the steps very carefully and watched the video several times and it still wasn’t working can you tell me what is wrong with my script.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WALK : MonoBehaviour
{
Rigidbody2d rb2d;
private float movespeed = 3;
public const string RIGHT = “right”;
public const string LEFT = “left”;

string buttonpressed;

// Start is called before the first frame update
void Start()
{
    rb2d = getcomponent<Rigidbody2d>();
}

// Update is called once per frame
void Update()
{
    if (input.Getkey(code.RightArrow)) 
    {
        buttonpressed = Right;

    }
    else if (Input.GetKey(code.LeftArrow))
    {

        buttonpressed = left;

    }
    else
    {
    }
        buttonpressed = null;
    {
       
    }
    
    }
    private void FixedUpdate()
    }
    if(buttonpressed == RIGHT)
    {
        rgb2d.velocity = new vector2(movespeed, 0);
    }
    else if(buttonpressed == LEFT)
    {

    }
}

}

Well, at first you should mark your strings as string with Quotation Marks. Also you closed some brackets (after the else statement). You should check your spelling, because c# is case sensitive, so “left” is not the same as “LEFT”. And your variables movespeed and rb2d are never defined. And its Keycode not code. So maybe, just as tip, you should learn some more basic coding, before starting some Uniytprojects.

So your code should be:

     string buttonpressed;
     public float movespeed;
    Rigidbody2D rb2d;
     // Start is called before the first frame update
     void Start()
     {
    
         rb2d = getcomponent<Rigidbody2d>();
     }
    
     // Update is called once per frame
     void Update()
     {
    
         buttonpressed = null;
         if (input.Getkey(Keycode.RightArrow)) 
         {
             buttonpressed = "RIGHT";
    
         }
         else if (Input.GetKey(Keycode.LeftArrow))
         {
    
             buttonpressed = "LEFT";
    
         }
       
             
      
         
         }
         private void FixedUpdate()
         {
         if(buttonpressed == "RIGHT")
         {
             rgb2d.velocity = new vector2(movespeed, 0);
         }
         else if(buttonpressed == "LEFT")
         {
    
         }
     }

But you can also simplify you code, because you can also ask for the key inside the FixedUpdate (and if you want to create a seamless control, please use axis instead). Quick example:

Rigidbody2D rb2d;
public float movespeed = 0f;
 // Start is called before the first frame update
 void Start()
 {
     rb2d = getcomponent<Rigidbody2d>();
 }

 // Update is called once per frame
     private void FixedUpdate()
     {
       float dir = Input.GetAxis("Horizontal");
       rb2d.velocity = new Vector2(dir,0) * movespeed;
     }