No attribute with the name 'MenuItem' error? help please.

Hello everyone ive been trying to create a simple prefab creation button following the Walker Boys tutorial but even though it is exactly the same i get an error that says

Error BCE0064: No attribute with the name ‘MenuItem’ or ‘MenuItemAttribute’ was found (attribute names are case insensitive).

Ive looked around everywhere and only a few other people seem to have had the issue and one solution was to comment out the errors then un-comment them after the build but this just causes further errors after for this particular script.

The scripts are in the Editor folder and ive done everything correct, has something changed since those tutorials were made or is there a work around for this, or more likely have i screwed up somewhere? Any help would be greatly appreciated.

Thanks in advance.

@MenuItem (“Project Tools/Make Prefab #&_p”)

static function CreatePrefab()
{
	var selectedObjects : GameObject[] = Selection.gameObjects;
	
	for(var go : GameObject in selectedObjects)
	{
		var localPath : String = "Assets/Prefabs/" + go.name + ".prefab";
		print(localPath);
	}
	createNew(localPath);
}

static function createNew (localPath : String)
	{
	var prefab : Object = PrefabUtility.CreateEmptyPrefab(localPath);
	PrefabUtility.ReplacePrefab(selectedObjects, prefab);
}

I’m guessing that you copy and pasted from the walker boys tutorial because the code appears fine. Try deleting that space just after @MenuItem and before the ‘(’. It may be an unrecognized character.