Minus not working?

I just need someone to look at my script other than me....

var spawnerhealth = "300";
var damagefromexplosion = "50";
var thisbox = Transform;

function OnTriggerEnter ( hit : Collider)
{
 if(hit.gameObject.tag == "fireball")
 {
 spawnerhealth -= damagefromexplosion;
 }
 }

function Update ()
{

if(spawnerhealth == 0)
{
Destroy(gameObject);
}

}

it says that -= is an invalid string. help?

You set spawnerhealth and damagefromexplosion as string :P

Should be

var spawnerhealth = 300;
var damagefromexplosion = 50;

you cannot assig -= to there it is totally wrong spawnerhealth you have alrady assignent some value eg var add : int;

add -= 1;