HELP bug about collision detection

the error says IDENTIFIER EXPECTED in my code about collision detection

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

public class NextLevel : MonoBehaviour
{

    public GameObject BIRD;

    // Start is called before the first frame update
    void Start()
    {
       
    }

    // Update is called once per frame
    void Update()
    {
        void OnTriggerEnter (BIRD.gameobject.tag = "Projectile")
        {
            //some code i havent written yet
        }
    }
}

There’s a lot of invalid syntax there. Not sure what tutorial you’re following, but you’ll want to take a closer look. Always refer to the docs first too: Unity - Scripting API: Collider.OnTriggerEnter(Collider)

Such as:

private void Update()
{
   
}

private void OnTriggerEnter(Collider other)
{
    if (other.CompareTag("Projectile"))
    {
       
    }
}

Do i leave the other there with the tag thing

Read the docs. It tells you what is required of OnTriggerEnter.

what does compare tags mean im trying to get the best understanding of this

nevermind found it on the doc thanks never knew of this