- Home /
Help with Error CS1519?
i am trying to do a tutorial off of youtube and i am writing the code but i always get error CS1519 unexpected symbol void' in class struct or interface member declaration. I tried everything. Searching the web, looking at the video code, searching it on youtube but nothing helps. here is my code.
using UnityEngine;
using System.Collections;
public class Enemy : MonoBehaviour {
public Transform[] enemyPoints;
public float moveSpeed;
private int currentPoint
// Use this for initialization
void Start () {
transform.position = enemyPoints[0].position;
currentPoint = 0;
}
// Update is called once per frame
void Update () {
if (transform.position == enemyPoints[currentPoint].position)
{
currentPoint ++;
}
transform.position = Vector3.MoveTowards(transform.position, enemyPoints [currentPoint].position.moveSpeed * Time.deltaTime);
}
}
Please help soon.
try posting a link to the tutorial if you're asking for help. i, for one, can't read $$anonymous$$ds.
"I tried everything."
except to pay more attention to what you're copying. i'd be surprised if the tutorial had the error...
in the meantime add a semicolon to line 7.
The answer was already given an hour and a half before you gjf, no need for the attitude or repost.
with all due respect it seems like the question was asked 47 $$anonymous$$utes ago, so not sure where you're getting your hour and a half from, and the only comment was as shown in the attached pic. kindly direct me to the answer.
Answer by dsada · Jul 15, 2014 at 07:02 PM
You are missing a semicolon at your last member declaration at line 7
private int currentPoint;
Your answer
