HELP WANTED!

Hello there.
I am a beginner with Unity and Scripting, and i’m facing a problem wich i can’t find a solution
here is the code:

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

public class Player : MonoBehaviour
{

public float speed;

LayerMask obstacleMask;
Vector2 targetPos;
Transform GFX;
float flipX;
bool isMoving;

void Start()
{
obstacleMask = LayerMask.GetMask(“Wall”, “Enemy”);
GFX = GetComponentInChildren().transform;
flipX = GFX.localScale.x;
}

void Update()
{
float horz = System.Math.Sign(Input.GetAxisRaw(“Horizontal”));
float vert = System.Math.Sign(Input.GetAxisRaw(“Vertical”));
if (Mathf.Abs(horz) > 0) if (Mathf.Abs(vert) > 0)
{
if (Mathf.Abs(horz) > 0)
{
GFX.localScale = new Vector2(flipX * horz, GFX.localScale.y);
}
if (!isMoving)
{

if (Math.Abs(horz) > 0)
{
targetPos = new Vector2(transform.position.x + horz, transform.position.y);
}
else if (Math.Abs(vert) > 0)
{
targetPos = new Vector2(transform.position.x, transform.position.y + vert);
}

//check for collisions
Vector2 hitSize = Vector2.one * 0.8f;
Collider2D hit = Physics2S.OverLapBox(targetPos, hitSize, 0, obstacleMask);
if (!hit)
{
StartCoroutine(Smoothmove());
}
}
}
}
iEnumerator Smoothmove()
{
isMoving = true;
while(Vector2.Distance(transform.position, targetPos) > 0.01f)
{
transform.position = Vector2.MoveTowards(transform.position, targetPos, speed * Time.DeltaTime);
yield return null;
}
transform.position = targetPos;
isMoving = false;
}
}

Unity shows me that error CS0246: The type or namespace name ‘iEnumerator’ could not be found (are you missing a using directive or an assembly reference?)

Do anyone more experienced with this help me?
Thanks.

It needs to start with a capital I

IEnumerator, instead of iEnumerator

I did it, but now i have three more errors:

6099291--663153--010101.png

  1. You are using “Math” instead of “Mathf” on those lines
  2. There no such thing as “Physics2S”, It is “Physics2D”. Capitalization is important. “OverLapBox” is incorrect, it is supposed to be “OverlapBox”
  3. It is “deltaTime”, not “DeltaTime”

If you get any further errors, verify that you have typed everything correctly, including capitalization. There is no room for mistakes in programming when it comes to typo’s

I am ashamed of myself haha.
Thank you so much, my script is running now.