expecting (, found 'Update' and unexpected char: 0x200B.

p.s.i’m a newbie here, so please explain this thoroughly :wink:

    #pragma strict
var speed = 5;                         
var rotSpeed = 120;                    
 


var turret : GameObject;            
 


var power = 600;               

var bullet : Transform;

var explosion: Transform;   
     
var snd : AudioClip;            


function Update() {

    var amtToMove = speed * Time.deltaTime;      

    var amtToRot = rotSpeed * Time.deltaTime;         
    

 


    var front = Input.GetAxis("Vertical");                   

    var ang = Input.GetAxis("Horizontal");               

   var ang2 = Input.GetAxis("MyTank");            


 


    transform.Translate(Vector3.forward * front * amtToMove);           

    transform.Rotate(Vector3(0, ang * amtToRot, 0));                         

   turret.transform.Rotate(Vector3.up * ang2 * amtToRot);              

 

function Update(); {

   ...................;


   

    if (Input.GetButtonDown("Fire1")) {

      var spPoint = GameObject.Find("spawnPoint");                                        

      Instantiate(explosion, spPoint.transform.position, Quaternion.identity);      

      AudioSource.PlayClipAtPoint(snd, spPoint.transform.position);                

      var myBullet = Instantiate(bullet, spPoint.transform.position, Quaternion.identity);


        myBullet.rigidbody.AddForce(spPoint.transform.forward * power);
        }

And now the errors…

Assets/jstank/jstank.js(73,1): BCE0044: expecting }, found ‘’.

Assets/jstank/jstank.js(55,5): BCE0043: Unexpected token: …

Assets/jstank/jstank.js(55,4): BCE0043: Unexpected token: …

Assets/jstank/jstank.js(53,10): BCE0044: expecting (, found ‘Update’.

You have garbage. Delete this:

function Update(); {

   ...................;

Okay. Lots wrong here, no offence. You’re missing tons of curly-braces. And never put a semi-colon before a curly brace. Otherwise you’re essentially telling it to stop the function but keep going. Of course it’s confused.

 #pragma strict
var speed = 5;                         
var rotSpeed = 120;                    



var turret : GameObject;            



var power = 600;               

var bullet : Transform;

var explosion: Transform;   

var snd : AudioClip;            


function Update() {

    var amtToMove = speed * Time.deltaTime;      

    var amtToRot = rotSpeed * Time.deltaTime;         





    var front = Input.GetAxis("Vertical");                   

    var ang = Input.GetAxis("Horizontal");               

   var ang2 = Input.GetAxis("MyTank");            





    transform.Translate(Vector3.forward * front * amtToMove);           

    transform.Rotate(Vector3(0, ang * amtToRot, 0));                         

   turret.transform.Rotate(Vector3.up * ang2 * amtToRot);              







    if (Input.GetButtonDown("Fire1")) {

      var spPoint = GameObject.Find("spawnPoint");                                        

      Instantiate(explosion, spPoint.transform.position, Quaternion.identity);      

      AudioSource.PlayClipAtPoint(snd, spPoint.transform.position);                

      var myBullet = Instantiate(bullet, spPoint.transform.position, Quaternion.identity);


        myBullet.rigidbody.AddForce(spPoint.transform.forward * power);
        }
    }

Code is very messy but try that, it might work.