I get three errors, no idea why..

The errors I get: Screenshot - 0eacdb3c2e1cecc014d121aaebcc58c5 - Gyazo
Sorry if Iโ€™m retarded! :slight_smile:

using UnityEngine;
using System.Collections;

public class Gun : MonoBehaviour {

	public enum FireMode{Auto, Burst, Single};
	public FireMode fireMode;
	public Transform muzzle;
	public Projectile projectile;
	public float msBetweenShots = 100;
	public float muzzleVelocity = 35;
	public float burstCount;

	public Transform shell;
	public Transform shellEjection;
	Muzzleflash muzzleflash;
	float nextShotTime;

	bool triggerReleasedSinceLastShot;
	int shotsRemainingInBurst;

	void Start(){
		muzzleflash = GetComponent<Muzzleflash>();
		shotsRemainingInBurst = burstCount;

	 void Shoot(){

		if(fireMode == FireMode.Burst){

			if(shotsRemainingInBurst == 0){
			shotsRemainingInBurst --;
		else if(fireMode = FireMode.Single){

		if (Time.time > nextShotTime) {
			nextShotTime = Time.time + msBetweenShots / 1000;
			Projectile newProjectile = Instantiate (projectile, muzzle.position, muzzle.rotation)as Projectile;
			newProjectile.SetSpeed (muzzleVelocity);

			Instantiate(shell, shellEjection.position, shellEjection.rotation);

	public void OnTriggerHold(){
		Shoot ();
		triggerReleasedSinceLastShot = false;
	public void OnTriggerRelease(){
		triggerReleasedSinceLastShot = true;
		shotsRemainingInBurst = burstCount;


The first and last error are caused because you are trying to set an integer to the value of a float.

public float burstCount; and int shotsRemainingInBurst; need to both be either integers or floats, depending on your needs.

For the second error, itโ€™s simply caused by a missing โ€˜=โ€™ on the line else if(fireMode = FireMode.Single){}.