- Home /
Question by
Dawnk41 · Apr 22, 2014 at 02:13 AM ·
parsing error
For some reason, this code is getting errors. (Parsing, and Unexpected '}')
For some reason, the following code keeps getting errors. Any ideas on what I'm doing wrong?
using UnityEngine;
using System.Collections;
public class Navmesh : MonoBehaviour
{
public Transform target;
NavMeshAgent agent;
void Start ()
{
NavMeshAgent = GetComponent<NavMeshAgent>();
}
void Update ()
{
agent.SetDestination(target.position)
}
}
Comment
Best Answer
Answer by getyour411 · Apr 22, 2014 at 02:13 AM
Change this
NavMeshAgent = GetComponent();
to this
NavMeshAgent agent = GetComponent();
Thanks! I also just figured out that I was missing a semicolon after line 19. Those two errors were fixed, and now my code is fixed too. Thank you!
Your answer
Follow this Question
Related Questions
CS8025 Error (Parsing Error) 1 Answer
error CS8025: Parsing error 2 Answers
Problem parsing package with API level 29 2 Answers
Parsing Error? 1 Answer
Unexpected symbol 'private' ... 1 Answer