script error for animation

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

public class melee : MonoBehaviour
{
//varibales;
Animator anim;
// Start is called before the first frame update

private void Start()
{
    anim = GetComponent<Animator>();
}

// Update is called once per frame
private void Update()
{
    if(Input.GetButtonDown("Fire2"))
        anim.SetBool("attacking", true);
    else if(Input.GetButtonUp("Fire2"))
        anim.SetBool("attacking", false);
}

}

im getting error Assets\Let’s Try Shooter\Scripts\CompletedScripts\anim.cs(10,13): error CS1520: Method must have a return type can someone help me

Let me ask a question to see if I’m understanding the situation right:

  1. Your script’s Filename is “anim.cs”
  2. And the class line inside is “public class melee : MonoBehaviour”?