Unexpected symbol and Parsing error?

I am new to C# and i usually code in js. I tried to write a little bit of code in C# because my animation script is in it so i thought it would be easier. I did everything i thought i should do and ended my lines exactly how they should be (or so i thought).

Here are the full error and the script pieces will be below. Im only putting in the part of the script i wrote so if you need to see the rest to fix it then feel free to ask. Thanks!

Assets/Player Stuff/Assets/Scripts/BotControlScript.cs(171,17): error CS1525: Unexpected symbol `{’

Assets/Player Stuff/Assets/Scripts/BotControlScript.cs(184,1): error CS8025: Parsing error

The next part is the script i wrote. It starts at line 170 and the script completely ends at line 184. I put it inside the fixedUpdate. I am trying to add “Strafe” animations to my character.

if(Input.GetKeyDown(KeyCode.A)
		{
				anim.SetFloat("Strafe", -1)
		}

			else if(Input.GetKeyDown(KeyCode.D)
		        {
					anim.SetFloat("Strafe", 1)
		        }
			else
			{
				anim.SetFloat("Strafe", 0)
			}
	}
}

Your if statements need closing parenthesis.

if(Input.GetKeyDown(KeyCode.A)

should be:

if(Input.GetKeyDown(KeyCode.A))

Also in C# lines end with a semi-colon ;

anim.SetFloat("Strafe", -1)

Should be:

anim.SetFloat("Strafe", -1);

anim = GetComponent ();

Please help it says parser error unexpected symbol “anim”

uhhm semicolons ?
like:

if(Input.GetKeyDown(KeyCode.A)
         {
                 anim.SetFloat("Strafe", -1);
         }
 
             else if(Input.GetKeyDown(KeyCode.D);
                 {
                     anim.SetFloat("Strafe", 1);
                 }
             else
             {
                 anim.SetFloat("Strafe", 0);
             }
     }
 }