Problem

Hi all!
I have a problem with some scripts.
I say “Assets / Scripts / Aim.js (25.19): UCE0001: ‘,’ expected. Insert a semicolon at the end.” And many other issues like that.
I do not know how to handle this.
Look my scripts

Gun Java script

var Bullet : Rigidbody;

var Spawn : Transform;

var BulletSpeed : float = 1000;

var ReloadTime : float = 2;

var AmmoInMag : float = 30;



static var AmmoLeft : float;

private var CanFire = true;









function Start (){

 AmmoLeft = AmmoInMag;   

}



function Update ()

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

        if(AmmoLeft > 0){ 

            BroadcastMessage("FireAnim");

            Fire();

        }

    }



    if(AmmoLeft == 0)

    {

        Reload();

    }



    if(Ammoleft < 0){

        Ammoleft = 0;

    }

}



function Fire(){

    if(CanFire == true){

         var bullet1 : Rigidbody = Instantiate(Bullet,Spawn.position,Spawn.rotation);

         bullet1.AddForce(transform.forward *BulletSpeed);

         AmmoLeft-= 1;

         audio.Play();

    }

}



function Reload(){

    CanFire = false;

    BroadcastMessage("ReloadAnim");

    yield WaitForSeconds(ReloadTime);

    CanFire = true;

}

Aim Java script

var HipPose : Vector3;
var AimPose : Vector3;
private var MainCam : GameObject;
private var WeapCam : GameObject;



function Start(){
    transform.localPosition = HipPose;
    MainCam = GameObject.FindGameObjectWithTag("MainCamera");
    WeapCam = GameObject.FindGameObjectWithTag("WeaponCamera");
}

function Update () 
{
    if(Input.GetButton("Fire2")){
        transform.localPosition = AimPose;
        MainCam.camera.field.ofView = 20;
        WeapCam.camera.field.ofView = 20;
    }

    if(!Input.GetButton("Fire2")){
        transform.localPosition = HipPose;
        MainCam.camera.fieldofView = 60;
        WeapCam.camera.field.ofView = 20;
        WeapCamvar Bullet : Rigid;
}

change line 25/26 of aim.js from

WeapCamvar Bullet : Rigid;
var Spawn : Transform;body;

to

var Bullet : RigidBody;
var Spawn : Transform;

Not sure if you highlighted and clicked and dragged some words around? but there are artifacts from other lines that would be combined.

Sorry! When I posted I posted the second and the first script. Copy Paste
But it pisses me off peak error.


all these are simple errors, go to each line and check that you have all required elements. The debug even has suggestions.