Bleeding and Health Generation Skript

Hey guys :slight_smile: Im currently working on an FPS project and I created this fairly simple skript for Health generation, with the mechanic that the player can bleed out if he looses too much health. I get a compound error from unity saying this: 'js(43,1): BCE0044: expecting }, found ‘’.

I was wondering if you could help me out sorry if I made some simple mistakes im still learning :smiley:

#pragma strict
var MaxHealth = 80.0;

var health = MaxHealth;

//Time Till the Player starts to Regenerate after timer Trigger
var regenTime = 100.0;
//How fast the Player Regenerates
var regenSpeed = 1.0;

//Time till the player starts to Bleed after timer Trigger
var bleedTime = 10.0;
//How fast the Player Bleeds
var bleedSpeed = -1.0;

//Timer for Regeneration/Bleeding
private var timer = 0.0;

function Start () {


function Update () 
		if(timer<regenTime) {
			health += regenSpeed/10;
		if(timer<bleedTime) {
			health -= bleedSpeed/20;

On line 28 you open the if(health<=21){ bracket. You need to close this bracket on line 34