no way to understand this

Hello every one, im facing a problem which is senseless. Im very new in unity so maybe i forgot something.

I got this:

using UnityEngine;
using System.Collections;

public class PaddleScript : MonoBehaviour {
	
	float paddleSpeed = 20f;
	public GameObject ballPrefab;
	GameObject attachedBall = null;
		
	// Use this for initialization
	void Start () {
		//Instanciar la nueva bola
		SpawnBall();
	}
	
	void SpawnBall(){
		if (ballPrefab == null){
			Debug.Log ("No se seleccionado el prefab del GameObject");
			return;
		}

		attachedBall = (GameObject)Instantiate( ballPrefab );
	}
	
	// Update is called once per frame
	void Update () {
		getController();
	}
	
	void getController(){
		
		transform.Translate (paddleSpeed * Time.deltaTime * Input.GetAxis("Horizontal"),0,0);
		
		if (attachedBall){
			Rigidbody ballRigidBody = attachedBall.rigidbody;
			ballRigidBody.position = transform.position + new Vector3(0,0.75f,0);
			if (Input.GetButtonDown("LaunchBall")){
				ballRigidBody.isKinematic = false;
				ballRigidBody.AddForce(300f  ,300f,0);
				attachedBall = null;
			}
		}
	}
	void OnCollisionEnter (Collision col){
		foreach (ContactPoint contact in col.contacts){
			if ( contact.thisCollider == collider ){
				float english = contact.point.x - transform.position.x;
				contact.otherCollider.rigidbody.AddForce( 300f * english, 0 , 0);
				
			}
		}

		
	}
}

It’s supposed to work (and in fact it does), BUT every time i run the game, console shows the message “No prefab selected in inspector” which i’ve set up for testing purposes. Actually prefab it’s set up in the inspector, so, what’s going on?

Ow i almost forgot it, in the line:

attachedBall = (GameObject)Instantiate( ballPrefab );

monodevelop says that the ballPrefab doesn’t exists in this context

Thanks in advance!

// At the top you make this null
GameObject attachedBall = null;

   // SpawnBall method
    void SpawnBall(){
      
       // ballPrefab is a prefab, not a variable.  This should be "attachedBall"
       // attached ball is still null, so this will return true
       if (ballPrefab == null){
         // You log
         Debug.Log ("No se seleccionado el prefab del GameObject");
         // You return for some reason, this ends the method.  Remove this
         return;
       }
       //  This never happens because method already returned
       attachedBall = (GameObject)Instantiate( ballPrefab );
    }

OK guys, I got it! you were COMPLETELY RIGHT! I had my script attached to two game objects just like robertbu and Eric5h5 said.

Thank you very much, I apreciate your help!