"Script Error: Update() can not be a coroutine". when i add an If statement, I get this error message on the console, not monodevelop.

This is the Script.
var numberOfJumps : float;
var jumpForce : float =3;

function Update()
{
	if(Input.GetButtonUp("Jump")){
		rigidbody.AddForce(Vector3.up * jumpForce * 100);
		numberOfJumps += 1;}
	**if (numberOfJumps == 2){
		yield WaitForSeconds(4);
		numberOfJumps = 0;}**	
	
}

Once I added the second if statement, there are no errors or warnings, but the script just wont work, cant even jump. while running the game I get “Script Error: Update() can not be a coroutine”. thanks a lot.

Update gets called for every frame. So it cannot be IEnumerable, i.e., it cannot be a co-routine.

From your I have observed that after pressing jump button you want to stop update for 4 seconds.

Instead of doing it try to cut and paste the jump code in a method which is coroutine and call it in update.

Your problem will get solved