Error CS1501:No OverLoad for method 'OverlapSphere' takes '1' arguments

Hi there guys i have a problem in my script this script is came from tutorial and im wondering if some one here can help me in my problem.
Assets/PlayerController.cs(103,11): error CS1501: No overload for method OverlapSphere' takes 1’ arguments

in Video Tutorial that script is working perfectly and fine but when i try on me i got that error im already editing it for days and i cant fix it so i decided to ask for help When i try to click Start button in game Scene is says All compiler error have to be fixed before you can enter in playmode. Thankyou in advance guys :smile:

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

public class PlayerController : MonoBehaviour {

public Animator anim;

[Header(“Movement”)]
private bool canMove;
public float movementSpeed;
public float velocity;
public Rigidbody rb;

[Header(“Combat”)]
private List enemiesInRange = new List();
private bool canAttack = true; //new
private bool attacking;
public float attackDamage;//new
public float attackSpeed;//new
public float attackRange;//new

// Use this for initialization
void Start () {

}

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

void GetInput(){
//Attack
if(Input.GetMouseButtonDown(0)){
print(“Attacking”);
Attack();
}
//move left
if(Input.GetKey(KeyCode.A)){
SetVelocity(-1);
}
else if(Input.GetKeyUp(KeyCode.A)){
SetVelocity(0);
anim.SetInteger(“Condition”, 0);
}
//move right
if(Input.GetKey(KeyCode.D)){
SetVelocity(1);
}
else if(Input.GetKeyUp(KeyCode.D)){
SetVelocity(0);
anim.SetInteger(“Condition”, 0);
}
}
#region MOVEMENT
void Move(){
if(velocity == 0){
// anim.SetInteger(“Condition”, 0);
return;
} else {
//we can only move if we are not doing something that doesn’t allow us to move.
if(canMove){//changed
anim.SetInteger(“Condition”, 1);
rb.MovePosition(transform.position + (Vector3.right * velocity * movementSpeed * Time.deltaTime));
}
}

}
void SetVelocity(float dir){
//look left or right depending on the (- +) of dir.
if(dir < 0) transform.LookAt(transform.position + Vector3.left);
else if(dir > 0) transform.LookAt(transform.position + Vector3.right);
velocity = dir;
}
#endregion

#region COMBAT
void Attack(){
if(!canAttack) return; //Changed
anim.SetInteger(“Condition”, 2);
StartCoroutine(AttackRoutine());
StartCoroutine(AttackCooldown()); //new
}

IEnumerator AttackRoutine(){
canMove = false;
yield return new WaitForSeconds(0.1f);
anim.SetInteger(“Condition”, 0);
yield return new WaitForSeconds(0.65f); //Changed
canMove = true;
}

//New
IEnumerator AttackCooldown(){
canAttack = false;
yield return new WaitForSeconds(1/attackSpeed);
canAttack = true;
}

void GetEnemiesInRange(){
Physics.OverlapSphere(transform.position + transform.forward);
}
#endregion
}

Use code tags, please Using code tags properly
Take a look at doc: Unity - Scripting API: Physics.OverlapSphere
You need one more argument, since how would you overlap sphere if you have just pos?, there is also radius needed Physics.OverlapSphere(Vector3 position, float radius)

“in Video Tutorial that script is working perfectly and fine”
Are you sure you didn’t missed one more argument in this funtion?
This is common mistake of beginners - they don’t look at code carefully enough and don’t read error either.

Ohhh my bad thankyou sir for Asap reply sorry i have work few hours ago … im a Beginner and want to learn more about Unity thankyou so much for Answer ill Update later when i start coding again :smile: