Argument `#1' cannot convert `float' expression to type `UnityEngine.Vector3 ?

i’m trying to make an Advanced AI script but i’m getting the following errors:
Assets/Scripts/AI/AvancedAI.cs(38,24): error CS1503: Argument #1' cannot convert float’ expression to type `UnityEngine.Vector3’

Assets/Scripts/AI/AvancedAI.cs(38,24): error CS1503: Argument #1' cannot convert float’ expression to type `UnityEngine.Vector3’
using UnityEngine;

public class AvancedAI : MonoBehaviour {

	public int health = 100;
	public float viewRange = 25f;
	public float attackRange = 5f;

	public bool isChasing = false;

	private UnityEngine.AI.NavMeshAgent agent;
	private Transform playerTransform;

	private void Start()
	{
		agent = GetComponent<UnityEngine.AI.NavMeshAgent> ();
	}

	private void Update()
	{
		Ray ray = new Ray (transform.position, Vector3.forward);
		RaycastHit hitInfo;

		if (Physics.Raycast (ray, out hitInfo, viewRange)) 
		{
			if (hitInfo.collider.tag == "Player") 
			{
				if (isChasing == false) 
				{
					playerTransform = hitInfo.collider.GetComponent<Transform> ();
					isChasing = true;
				}
			}
		}

		if (Physics.Raycast (viewRange, out hitInfo, attackRange))

		Debug.DrawRay (ray.origin, ray.direction * viewRange, Color.red);

		if (isChasing == true) 
		{
			agent.SetDestination (playerTransform.position);
		}
	}
}

What did i do wrong?

I think the problem is with the second raycast first argument viewRange. You should change it to ray.