enemy attack not recognizing players stats

I’ve coded a script for enemy attacks, and they are supposed to lower the players HP by the designated amount, but lower it depending on the players defense stats.

This is the script attached to the attack object:

var damage = 0;
var FIREdamage = 0;
var ICEdamage = 0;
var SHOCKdamage = 0;



function OnCollisionEnter (myCollision : Collision) {
 if(myCollision.gameObject.name == "Player"){
  var health : player_script = myCollision.gameObject.GetComponent(player_script);
  health.HP = health.HP - damage * (1 - (health.Physical_resist / 100));
  health.HP = health.HP - FIREdamage * (1 - (health.Fire_resist / 100));
  health.HP = health.HP - ICEdamage * (1 - (health.Ice_resist / 100));
  health.HP = health.HP - SHOCKdamage * (1 - (health.Shock_resist / 100));
   
 }
}

In the game, I set the damage to 5, and the players Physical_resist stat is at 75, so the player should concievably recieve 75% less damage, but when playing the level, the player stills receives 5 damage.

This is the players script

var LVL : int = 1;

var EXP : int = 0;
var Upgradepoints : int = 5;

var STR = 1;
var MAG = 1;
var END = 1;

var Fire_resist = 0;
var Ice_resist = 0;
var Shock_resist = 0;
var Physical_resist = 0;


var MAXHP : int = 10;
var HP : int = 10;
var MAXMP : int = 10;
var MP : int = 10;

var deathlevel : String;

var infotext : GUIText = gameObject.GetComponent(GUIText);

var MPtext : GUIText = gameObject.GetComponent(GUIText);
var HPtext : GUIText = gameObject.GetComponent(GUIText);
var MPMAXtext : GUIText = gameObject.GetComponent(GUIText);
var HPMAXtext : GUIText = gameObject.GetComponent(GUIText);

var leveltext : GUIText = gameObject.GetComponent(GUIText);
var exptext : GUIText = gameObject.GetComponent(GUIText);





function Start () {
    InvokeRepeating("check",0,0.001);
    
    
    
    
    
}

function check () {

MAXMP = 10 + (MAG * LVL);
MAXHP = 10 + (END * LVL);

	if(EXP > LVL*10) {
	LVL = LVL + 1;
	EXP = 0;
	Upgradepoints = Upgradepoints + 1;
	}

MPtext.text =  "MP "+MP;
HPtext.text =  "HP "+HP;
HPMAXtext.text =  "/  "+MAXHP;
MPMAXtext.text =  "/  "+MAXMP;

leveltext.text =  "LEVEL:"+LVL;
exptext.text =  "EXP:"+EXP;

}




function Update () {
	if(HP < 0){
	 
	Application.LoadLevel(deathlevel);
	
	}
	if(MP < 0){
	 
	MP = 0;
	
	}
	if(MP > MAXMP){
	 
	MP = MAXMP;
	
	}
	if(HP > MAXHP){
	 
	HP = MAXHP;
	
	}
	

}

What is wrong with the scripts?

75% of 5 is not an int(integer). You’ll get a decimal number, which will be approximated to the nearest integer. Try changing the ints to floats.