No overload for method OnCollisionEnter

I have a small problem, I’m trying that my ball will always jump the same height, it bounces up and in every platform it jumps less and less, i want it to maintain same height jump, so I’m trying to do that when it collides with a platform it will rigidbody.addfore
but i get this weird error, here’s my script.

	void OnCollisionEnter (Collision col){

		if ( == "Platform") {
			rigidbody.AddForce(Vector2.up * 6);

	// Update is called once per frame
	void Update () {
		OnCollisionEnter ();


Calling OnCollisionEnter() is wrong. Unity calls it for you when the object enters a collider.

OnCollisionEnter(Collision) is called automatically, when Unity detects a collision. You never call this function in the code.