gives error - BCE0005: Unknown identifier: 'Collisions'.

var speed = 3.0 ;
var grenadePrefab:Transform ;

function Update ()
{
//find out if fire button is pressed

if(Input.GetButtonDown ( "Fire1"))

{
if(Collisions.GRENADE_AMMO > 0)
{
var grenade = Instantiate (grenadePrefab , transform.position , Quaternion.identity);

grenade.rigidbody.AddForce(transform.forward * 2000);

Collisions.GRENADE_AMMO --;

print("YOU NOW HAVE " + Collisions.GRENADE_AMMO + " GRENADES ");

}
  }
	
}

You’re asking the program to look for something named Collisions. The error message is telling you it can’t find anything with that name (identifier is the technical term for a name.) You didn’t make one, and it isn’t anything built into Unity.

The thing is, it looks like you have a friend named “Collisions” and want to check how many grenades she has, which I don’t think is true. Why not just make your own grenadeAmmo variable (make it right next to speed, the same way, except no point-zero on the end) and just use it (without “Collisions-dot” in front)?

Just a note, most people use all caps only for something that will never (or almost never) change, like MAX_GRENADE_AMMO.