Camera.main.GetComponent(ColorCorrectionEffect).rampOffsetR = 100-health;
Okay so im new in unity and i am getting familiarised with it. Now i have this line in an update() function and it recieves the following error:
Assets/Standard Assets/Scripts/FPSWalker.js(155,74): BCE0044: expecting :, found '='.
here is the whole function Update() (maybe the problem is out there)
function Update () {
// If the run button is set to toggle, then switch between walk/run speed. (We use Update for this...
// FixedUpdate is a poor place to use GetButtonDown, since it doesn't necessarily run every frame and can miss the event)
if (toggleRun && grounded && Input.GetButtonDown("Run")){
speed = (speed == walkSpeed? runSpeed : walkSpeed);
}
if (health<1){
audio.PlayOneShot(shadap);
transform.position = respawnpoint.transform.position;
dietimes++;
health=101;
}
if(health<100);{
Camera.main.GetComponent(ColorCorrectionEffect).rampOffsetR = 100-health;
yield WaitForSeconds(0,2);
health+=1;
}
}