On line 32 of my code error CS1022 Type or namespace definition, or end-of-file expected shows up

Hi, I’m relatively new to coding and I got a new error called “Error CS1022 Type or namespace definition, or end-of-file expected”? I don’t know what it means and other posts didn’t help me either.
(My code)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.XR.Interaction.Toolkit;
public class FireBulletOnActivate : MonoBehaviour
{
    public GameObject bullet;
    public Transform spawnPoint;
    public float firespeed = 20;
    // Start is called before the first frame update
    void Start()
    {
        XRGrabInteractable grabbable = GetComponent<XRGrabInteractable>();
        grabbable.activated.Addlistener(FireBullet);
    }
    // Update is called once per frame
    void Update()
    {
       
    }
    public void FireBullet(ActivateEventArgs arg);
    {
        GameObject spawnedBullet = Instantiate(bullet);
        spawnedBullet.transform.position = spawnPoint.position;
        spawnedBullet.GetComponent<RigidBody>().velocity = spawnPoint.forward * firespeed;
        Destroy(spawnedBullet, 5);
    }
}

It means you have a typo.

Look at line 22 and see what’s wrong.

1 Like