SetFloat not working in C#?

So lately I have been doodling around with my development team and made a script for managing all weapons. I have the bulk of the script done but when I try to make it easy for level designers it gets to a bit of a grey spot.

So what I’m trying to do is when someone chooses a certain enum the variables will change right then in the editor.
So far this is what I have come up with:

 public enum clipSize {
	    Eight,
		Twelve,
		SixTeen,
	    EightTeen,
		Twenty,
		TwentyFour,
		ThirtyTwo,
	} 
	public enum fireType {
	    Single,
		RapidFire,
		BoltAction,
	}
	public enum FirstGun {
	    AK47,
		Pistol,
		Sniper,
	}
	float gunShotTimer;
	public float timeBetweenShots = 1.0F;
	
	
	
	static void Init () {
		if(FirstGun == FirstGun.AK47){
		    EditorPrefs.SetFloat(timeBetweenShots, 0.1F);
		} 

}

So when I have the SetFloat I get 2 Errors:

Error 1:

Assets/Standard
Assets/Scripts/Systems/Gun/Devon/Gun.cs(33,20):
error CS0119: Expression denotes a
type', where a variable’, value' or method group’ was expected

Error 2:

Assets/Standard
Assets/Scripts/Systems/Gun/Devon/Gun.cs(34,21):
error CS0103: The name `EditorPrefs’
does not exist in the current context

It might just be the fact that I haven’t found any solid way of if checking enums or maybe I need to put this all in other context, but if anyone out there had a solution that would be awesome for me!

1st error: this line is not correct, you are trying to compare a type with a value.

if(FirstGun == FirstGun.AK47){

What you want is having a variable of type FirstGun and comparing it with a possible value (in this case AK47):

public FirstGun gunType;

// why static?
void Init()
{
    if( gunType == FirstGun.AK47 ){

2nd error: if you’d look at the documentation, you will see that SetFloat takes a string as first parameter, and that EditorPrefs is defined in UnityEditor assembly. Thus:

using UnityEditor;

// ...

void Init()
{
    if( gunType == FirstGun.AK47 ){
        EditorPrefs.SetFloat( "timeBetweenShots", timeBetweenShots );

Now back to what your are trying to achieve. Using EditorPrefs will not change anything in the inspector of your class. What you need to do is make your script execute in edit-mode and in its Update method check for the enum value to set your variable:

[ExecuteInEditMode]
class MyScript : MonoBehaviour
{
    public enum FirstGun {
        AK47,
       Pistol,
       Sniper,
    }
    float gunShotTimer;
    public float timeBetweenShots = 1.0F;
    public FirstGun gunType;

    void Update()
    {
        if( Application.isEditor && !Application.isPlaying )
        {
            switch( gunType )
            {
            case AK47:
                timeBetweenShots = 0.1f;
            break;
            // do other cases here
            }
        }
    }
}