I have this error I don’t know how to fix it here is the code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Gun : MonoBehaviour{
public float range = 100f;
public float damage = 10f;
public Camera fpsCam;
void Update()
{
if (Input.GetButtonDown("Fire1")){
shoot()
}
void shoot();
{
string RaycastHit hit;
if ( physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hitrange))
{
Debug.Log(hit.transform.name);
}
}
}
}