ERROR cs0101 im tired of it

ive seen many answers and tried everything like changing the name of the script , moving the script tosome other folder , e.t.c.
Please suggest something else.
im new to c# scripting thats why I was trying one of those 2D Roguelike tutorials.

my error is somewhat like this-

Assets/Scripts/GameManager.cs(8,22): error CS0101: The namespace global::' already contains a definition for GameManager’

my code is somewhat like this-

using UnityEngine;
using System.Collections;

using System.Collections.Generic;        

public class GameManager : MonoBehaviour
{

    public static GameManager instance = null;              
	private BoardManager boardScript;                       
	private int level = 3;                                  
	
	void Awake()
	{
		if (instance == null)
			
			instance = this;
		
		else if (instance != this)
			
			Destroy(gameObject);    
		
		DontDestroyOnLoad(gameObject);
		
		boardScript = GetComponent<BoardManager>();
		 
		InitGame();
	}
	
	void InitGame()
	{
		boardScript.SetupScene(level);
		
	}
	
	
	void Update()
	{
		
	}
}

People please help!

It seems that there is already a script named GameManager somewhere. Are you using any plugins/libraries/etc?

When you say ‘changing the name of the script’, do you mean the filename or the class name? I would be really surprised if changing the class name wouldn’t work. And because this is a MonoBehaviour, you actually need to change both.

Another solution would be to add you class in a namespace (this is a good practice for all your classes actually):

using System.Collections.Generic;

namespace MyCompany.MyGame
{
    public class GameManager : MonoBehaviour
    {
        // rest of the class
    }
}