FPS 1.23 Switching Guns.

FPS 1.23
i finished my script and i get this error
GunScript.js(99,67) expecting :, found ‘=’.

heres my code

var beingHeld : boolean;
var outSideBox : GameObject;
@HideInInspector
var countToThrow : int = -1;
var playerTransform : Transform;
var playerMovementScript : PlayerMovementScript;
@HideInInspector
var CameraObject : GameObject;
@HideInInspector
var TargetXRotation : float;
@HideInInspector
var TargetYRotation : float;
@HideInInspector
var TargetXRotationV : float;
@HideInInspector
var TargetYRotationV : float;
var RotateSpeed : float = 0.3;
var HoldHight : float = -0.3;
var HoldSide : float = 0.5;
var RacioHipHold : float = 1;
var HipToAimSpeed : float = 0.2;
@HideInInspector
var RacioHipHoldV : float;
var AimRacio : float = 0.6;
var ZoomAngle : float = 30;
var FireSpeed : float = 15;
@HideInInspector
var WaitTilNextFire : float = 0;
var Bullet : GameObject;
var BulletSpawn : GameObject;
var ShootAngleRandomizationAiming : float = 5;
var ShootAngleRandomizationHip : float = 15;
var CurrentRecoilAmount : float = 0.5;
var RecoilRecoverTime : float = 0.2;
@HideInInspector
var CurrentRecoilZPosition : float;
@HideInInspector
var CurrentRecoilZPositionV : float;
var BulletSound : GameObject;


function LateUpdate()
{
if (beingHeld)
{
rigidbody.useGravity = false;
outSideBox.GetComponent(Collider).enabled = false;

var HoldSound : GameObject;

if (Input.GetButtonDown("Fire1"))
{
  if (WaitTilNextFire <= 0);
  if (Bullet);
  Instantiate(Bullet,BulletSpawn.transform.position,BulletSpawn.transform.rotation);
  WaitTilNextFire = 1;
TargetXRotation += (Random.value - 0.5) * Mathf.Lerp(ShootAngleRandomizationAiming,ShootAngleRandomizationHip,RacioHipHold);
TargetYRotation += (Random.value - 0.5) * Mathf.Lerp(ShootAngleRandomizationAiming,ShootAngleRandomizationHip,RacioHipHold);
CurrentRecoilZPosition -= CurrentRecoilAmount;
if (BulletSound);
HoldSound = Instantiate(BulletSound,BulletSpawn.transform.position,BulletSpawn.transform.rotation);
}
if (HoldSound)
HoldSound.transform.parent = transform;

CurrentRecoilZPosition = Mathf.SmoothDamp(CurrentRecoilZPosition, 0,CurrentRecoilZPositionV,RecoilRecoverTime);
CameraObject.GetComponent(MouseLookScript).CurrentTargetCameraAngle = ZoomAngle;

if (Input.GetButton("Fire2"))
{
RacioHipHold = Mathf.SmoothDamp(RacioHipHold,0,RacioHipHoldV,HipToAimSpeed);
CameraObject.GetComponent(MouseLookScript).CurrentAimRacio = AimRacio;
}

if (Input.GetButton("Fire2") == false)
{
RacioHipHold = Mathf.SmoothDamp(RacioHipHold,1,RacioHipHoldV,HipToAimSpeed);
CameraObject.GetComponent(MouseLookScript).CurrentAimRacio = 1;
}

transform.position = CameraObject.transform.position + (Quaternion.Euler(0,TargetYRotation,0) * Vector3(HoldSide * RacioHipHold, HoldHight * RacioHipHold, 0) + Quaternion.Euler(TargetXRotation,TargetYRotation,0) * Vector3(0,0,CurrentRecoilZPosition));

TargetXRotation = Mathf.SmoothDamp( TargetXRotation, CameraObject.GetComponent(MouseLookScript).XRotation, TargetXRotationV, RotateSpeed);
TargetYRotation = Mathf.SmoothDamp( TargetYRotation, CameraObject.GetComponent(MouseLookScript).YRotation, TargetYRotationV, RotateSpeed);
transform.rotation = Quaternion.Euler(TargetXRotation, TargetYRotation, 0);
}
}

if (!beingHeld)
{
rigidbody.useGravity = true;
outSideBox.GetComponent(Collider).enabled = true;

countToThrow -= 1;
if (countToThrow == 0)
rigidbody.AddRelativeForce(0,playerMovementScript.throwGunUpForce,playerMovementScript.throwGunForwardForce);
if (Vector3.Distance(transform.position,playerTransform.position) < playerMovementScript.distToPickUpGun  Input.GetButtonDown("Use Key") playerMovementScript.waitFrameForSwitchGuns <= 0);
{
playerMovementScript.currentGun.GetComponent(GunScript).beingHeld = false;
playerMovementScript.currentGun.GetComponent(GunScript).countToThrow = 2;
playerMovementScript.currentGun = gameObject;
beingHeld = true;
targetYRotation = CameraObject.GetComponent(MouseLookScript).YRotation - 100;
playerMovementScript.waitFrameForSelection = 2;
}
}
}

function Awake ()
{
countToThrow = -1;
playerTransform = GameObject.FindWithTag("Player");
playerMovementScript = GameObject.FindWithTag("Player").GetComponent(PlayerMovementScript);
CameraObject = GameObject.FindWithTag("MainCamera");
}

line 63 : after “if (HoldSound)” miss a " {"
line 97 : remove “;” at the end of the line.

Thanks!
i should have seen that :stuck_out_tongue:
i also forgot a transform at 113

you’re welcome