I have created two scripts one is scrpt_Enemy and other is scrpt_GameManager.
I want to call SubtractLive() function (exist on scrpt_GameManager) from scrpt_Enemy. But it gives error I don't know why. The error is 'SubtractLive' is not a member of 'UnityEngine.Component'.
scrpt_Enemy:
var gameManager : GameObject;
gameManager.GetComponent("scrpt_GameManager").SubtractLive();
scrpt_GameManager:
var lives : int =3;
function SubtractLive(){
lives -= lives;
}