Error CS1003: Syntax error, ',' expected

My code is:

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

public class Weapon : Mono Script
{
    
    public int damage;

    public Camera camera;

    public float fireRate;


    private float nextFire;

    // Update is called once per frame
    void Update()
    {
        if (nextFire > 0)
            nextFire -= Time.deltaTime;

        if (Input.GetButton("Fire1") && nextFire <= 0)
        {
            nextFire = 1 / fireRate;
        
        Fire();
        
        }
    }

    void Fire()
    {
        Ray ray = new Ray(camera.transform.position, camera.transform.forward);

        RaycastHit hit;

        if (Physics.Raycast(ray.origin, ray.direction, out hit, 100f))
        {
            if (hit.transform.GameObject.GetComponent<Health>())
            {
                hit.transform.GameObject.GetComponent<PhotonView>().RPC("TakeDamage", RpcTarget.All, damage);
            }
        }
    }
}

Im not sure why it wont work.

Hi, If your copy code is Accurately, then:

  1. MonoScript shouldn’t have a space.
  1. transform.gameObject, it should be a lowercase ‘g’

I did that mono script one but got errors. I just did that lowercase one and now have more errors.

First error:

Assets\Scripts\Weapon.cs(5,23): error CS0246: The type or namespace name 'MonoScript' could not be found (are you missing a using directive or an assembly reference?)

Second error:

Assets\Scripts\Health.cs(10,3): error CS0246: The type or namespace name 'PunRPCAttribute' could not be found (are you missing a using directive or an assembly reference?)

And third error:

Assets\Scripts\Health.cs(10,3): error CS0246: The type or namespace name 'PunRPC' could not be found (are you missing a using directive or an assembly reference?)