Fire1 not working

I’m dong the Space Shooter tutorial and I’ve written the code just like they have in the tutorial as follows but when I go to test it in the game I get what follows the code.

private void Update()
{
if (Input.GetButton(“fire1”) && Time.time > nextFire)
{
nextFire = Time.time + fireRate;
// GameObjset Clone =
Instantiate(shot, shotspawn.position, shotspawn.rotation); // as GameObject;
}

ArgumentException: Input Button fire1 is not setup.
To change the input settings use: Edit → Project Settings → Input
PlayerControler1.Update () (at Assets/_Scripts/PlayerControler1.cs:25)

I don’t know what all that means. May I get some help.

1 Like

I found my own mistake I needed to capitalize the “F” in Fire1

dude here is my problem:
I have tried to create a raycast hit in a cube with box collider but there is no output, no error: help please… here is my code:
using UnityEngine;
using System.Collections;

public class Gun : MonoBehaviour {

public float damage = 10f;
public float range = 100f;

public Camera fpsCam;

// Update is called once per frame

void Update () {
if (Input.GetButtonUp(“Fire1”) && IsInvoking()) {
RaycastHit hit;
if (Physics.Raycast(fpsCam.transform.position, fpsCam.transform.forward, out hit))
{
Debug.Log(“hit”);
}
}
}
}

Why are you checking IsInvoking?