Error CS1513: } expected (941636)

I’m not sure if I’ve put this post in the right place but i need help idk really what I’m doing wrong and i need someone with more experience to help.

I keep getting error CS1513: } expected.

here is my code.

9685517–1381385–FPScontroller1.cs (2.18 KB)

You’re missing a closing curly brace for both your Update function and your class.

Put two of these } at the end of the file.

You have lots of typos too, so expect that fixing this will reveal more errors, maybe you can fix those already.

Use the forum’s ‘Insert Code’ button when making a post too :wink: Saves people having to download your script to see it.

thank you so much. :slight_smile:

J’ai le bug, je ne sais pas quoi faire, aide-moi

en utilisant UnityEngine ;

classe publique EnemyPatrol : MonoBehaviour
{
vitesse du flotteur public ;
points de cheminement publics Transform[ ] ;

cible de transformation privée ;
privé int desPoint = 0;

// Start est appelé avant la première mise à jour du frame
vide Début()
{
cible = points de cheminement[0] ;
}

// La mise à jour est appelée une fois par image
Annuler la mise à jour()
{
Vector3 dir = target.position - transform.position;
transform.Tranlate(dir.normalized * speed * Time.deltaTime, Space.World);

//Si l’ennemi est quasiment arrivé à sa destination
if(Vector3.Distance(transform.position, target.position) < 0,3f)
{
desPoint = (desPoint + 1) % waypoints.Length;
cible = waypoints[desPoint];
}
}
}

6741043--776845--upload_2021-1-19_19-3-0.png