You will need to encapsulate your integers in a Vector3, like this:
if(Input.GetMouseButtonDown(0) &&
collider.Raycast(Camera.main.ScreenPointToRay(new Vector3(Screen.width / 2, (Screen.height / 2, 0)), hit, Mathf.Infinity)) {
}
Note that I have inserted new Vector3() around your three integers, that will cause them all to be a part of a newly created Vector3 object, which ScreenPointToRay can use : D
EDIT:
As Kat0r has pointed out,
Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f));//C# version Camera.main.ViewportPointToRay(new Vector3(0.5, 0.5, 0.0));//JS version Is another (slightly faster) way to get the center of the screen
Camera.main.ViewportPointToRay(new Vector3(0.5f, 0.5f, 0f));//C# version Camera.main.ViewportPointToRay(new Vector3(0.5, 0.5, 0.0));//JS version Is another (slightly faster) way to get the center of the screen