`UnityEngine.Camera' does not contain a definition for `ScreentPointToRay' and no extension method `ScreentPointToRay' of type `UnityEngine.Camera' could be found. Are you missing an assembly reference?

Could someone please explain why I am getting this error message.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Playerpickup : MonoBehaviour {

    GameObject mainCamera;
    bool carrying;
    GameObject carriedObject;
    public float distance;

	// Use this for initialization
	void Start () {
        mainCamera = GameObject.FindWithTag("MainCamera");		
	}
	
	// Update is called once per frame
	void Update () {
        if (carrying)
        {
            carry(carriedObject);
        }
        else
        {
            pickup();
        }
      }

    void carry(GameObject cursor) {

        cursor.GetComponent<Rigidbody>().isKinematic = true;
        cursor.transform.position = mainCamera.transform.position + mainCamera.transform.forward * distance;



    }

    void pickup() {  
    if (Input.GetKeyDown (KeyCode.E)) { 
        int x = Screen.width / 2;
        int y = Screen.height / 2;

        Ray ray = mainCamera.GetComponent<Camera>().ScreentPointToRay(new Vector3(x, y));
        RaycastHit hit;

      if (Physics.Raycast(ray, out hit))
        {
            Objectpickup p = hit.collider.GetComponent<Objectpickup>();
            if (p != null){
                carrying = true;
                carriedObject = p.gameObject;
            }
        }
       }
    }
}

Because the name of the method is Camera.ScreenPointToRay :wink: