Any problems with this script?

I attached script B to generators (When you press “E”, value of “CountGenerator” in Script A will increase)

//Script B

var message : boolean = false;
var GeneratorGUI : GameObject;
var Generator1 : GameObject;
var useGui : boolean = true;

function OnTriggerStay(other : Collider)
{
	if(Input.GetButton("e"))
	{
		GeneratorGUI.GetComponent(GeneratorCountNumbers).addCount(1);
		disableGui();
	}
}

function disableGui () 
{
	Generator1.GetComponent(ActiveGenerator).useGui = false;
}

function OnTriggerEnter (other : Collider){
	if (other.gameObject.tag == "Player") {
		message = true;
	}
}
     
function OnTriggerExit (other : Collider){
	if (other.gameObject.tag == "Player") {
		message = false;
	}
}

function OnGUI()
{
	if(message)
	{
		if(useGui)
		{
			GUI.Label(new Rect(Screen.width/2 - 75, Screen.height - 100, 300, 30), "Press E to turn on the generator");
		}
	}
}

This is script A attached to Emptygameobject and called “GeneratorGUI”

//Script A

public static var CountGenerator : int = 0;
var Onemore : GUIText;
var Activated : GUIText;
var Gate : GameObject;
var GateOpenSound : AudioSource;
     
function addCount(int value)
{
    CountGenerator += value;
     
    if(CountGenerator == 1)
    {
    	Onemore.enabled = true;
    	yield WaitForSeconds(3);
    	Onemore.enabled = false;
    }
    
    if(CountGenerator == 2)
    {
    	Activated.enabled = true;
    	yield WaitForSeconds(3);
   		Activated.enabled = false;
    	Gate.animation.Play("OpenGate");
    	GateOpenSound.Play();
    }
}

I got an error

Assets/GeneratorCountNumbers.js(9,23): BCE0043: Unexpected token: value.

The syntax of your AddCount function is written as if it were C#, when it should be in JS.
Instead of this:

function AddCount(int value)

it should read

function AddCount(value : int)