Can't access a javascript static variable from c# script

Hello! I’m trying to modify a static var contained in a javascript script from a C# script - given to the same gameobject - but i get an error. The problem seem to be the syntax. This is my C# code:

using UnityEngine;
using System.Collections;

public class NewBehaviourScript : MonoBehaviour {
	public void SetCheckBoxValue(string myCheckBoxVal)
	    if (myCheckBoxVal == "true"){
			gameObject.GetComponent("GameControllerScript").gameMode = 1;
	    if (myCheckBoxVal == "false"){
			gameObject.GetComponent("GameControllerScript").gameMode = 2;

The error i get is “Type “UnityEngine.Component” does not contain a definition for “gameMode” and no extension method “gameMode” of type “UnityEngine.Component” could be found (are you missing a using directive or an assembly reference?)”

Go check out Unity Gems, about halfway through their list of ‘Unity Gotchas.’

Is the script you’re calling in the plugins, standard assets, or pro standard assets folders? C# compiles before javascript, so it can’t refer back, unless you put the js in one of those folders, which will force the program to compile it first.