New To C#, Trying To Make A Static Function... Getting Unexpected Symbol 'Static'

Any help would be appreciated. Here is the code.
using UnityEngine;
using System.Collections;

public class ActionText : MonoBehaviour {
	void Start() {
		static bool clear = 0;
	}
	public static void genText(string text) {

	}
	private void clearText() {
		//ActionText.clear = 1;
		//ActionText.clear = 0;
	}
}

First of all: Don’t declare static variables inside a method!

Second, Why do you want do use static variables? Because ActionText will always be an actual object when using MonoBehaviour as superclass.

Third, Your concept is really weird, You want to Set a static variable of the same class in a non static method???

I really doubt if your code equals to your needs but to make your code work do this:

public class ActionText : MonoBehaviour
{
    public static bool Clear;

    protected void Start()
    {
        
    }

    public static void GenerateText(string text)
    {

    }

    private void clearText()
    {
        Clear = true;
        Clear = false;
    }
}

C# does not allow static variables inside of functions like e.g. C++ does.

You need to move the “bool clear” out of the start function.

public class ActionText : MonoBehaviour {
     static bool clear = 0;
     void Start() {
     }
     public static void genText(string text) {
 
     }
     private void clearText() {
         //ActionText.clear = 1;
         //ActionText.clear = 0;
     }
}