Fixed error but error still shows in the console

private var Bullet : GameObject;
function Update(){
//Get input position in pixels (screen-coordinates);
Vector2 screenPos = Input.touches[0].position;
//Convert from screen coordinates (pixels) to world-coordinates;
Vector3 worldPos = camera.ScreenToWorldPoint(new Vector3(screenPos.x, screenPos.y, camera.nearClipPlane));
//Move the empty-object to the location of click/tap;
transform.position = worldPos;
//Instantiate a new object at that location
Instantiate(Bullet , worldPos , Quaternion.identity);
//Fire away!
Bullet.rigidbody.AddForce(transform.forward * 5000);
}
In the console it brings up :
Shoot.js(4,12): UCE0001: ‘;’ expected. Insert a semicolon at the end.
Shoot.js(6,12): UCE0001: ‘;’ expected. Insert a semicolon at the end.

Line 4 and 6 both have semicolons at the end , but error still shows . I’ve saved and everything . They both also have Vector2/3 in it ? Does that have something to do with this.

The compiler is only telling you what little it can figure out from what you gave it. The main problem is that you’re trying to mix C# with Unityscript syntax, which you can’t do. Use one language or the other.

Close your script in your IDE (or shut down your IDE completely). Click Assets → SyncMonoDevelop Project, then re-open that script via Unity (double click it) and save changes in it.

Hope that helps

Paul