i keep trying to run my script but it keeps telling me UnityEngine.Vector3 does not contain a contructor that takes 4 arguements i know what this means but i dont know how to fix it

using System.Collections;
using UnityEngine;

public class spawn : MonoBehaviour {

public GameObject fruit;
int spawnNum = 8;

void spawns(){

	for(int i = 0; i < spawnNum; i++ ){

		Vector3 fruitPos = new Vector3(this.transform.position.x + Random.Range(-1.0f,1.0f),
			                            this.transform.position.y + Random.Range(0.0f,2.0f),
			                            this,transform.position.z + Random.Range(-1.0f,1.0f));
		Instantiate (fruit, fruitPos, Quaternion.identity);

	}

}

// Use this for initialization
void Start () {
 
	spawns();
}

// Update is called once per frame
void Update () {
	
}

}

You typed a comma instead of a dot:

this,transform.position.z + Random.Range(-1.0f,1.0f));

needs to be

this.transform.position.z + Random.Range(-1.0f,1.0f));

Your third argument has a “,” instead of a “.” after this, essentially making your 3rd argument the class spawn, and your third argument the z coordinate + random range of the object spawn is the script of.