Whenever I make any script Unity always has the same problem "Expecting EOF, found (whatever i have put in). Why is this happening…here is an example…
var health: float = 10.0;
var maxHealth: float = 10.0
var playerController: TankControl;
playerController = GetComponent(TankControl);
var controller : CharacterController;
controller = GetComponent(CharacterController);
funtion ApplyDamage(damage: float){
health-=damage;
if health <=0){
health = 0;
Die()
}
}
i would the state the funtion of (die) later but anyway the same error keeps coming up expecting EOF found (something)