Accessing variables from scripts issues

I am having an issue of accessing a script using the examples I found all over but no matter what I do it will either tell me it doesn’t exist or the unity editor complains about it while not complaining in monodevelop. Now my main issue is because I need to write a program for I/O I need c# and I have variables I need from javascript to save variables. Now in my javascript I am trying to access another script by using this code;

public var otherscript:FileScript;

function Awake()
   otherscript = this.GetComponent(FileScript);

so FileScript is in C#
now I keep getting an error message from the public var line saying "The name “FileScript” does not denote a valid type (‘not found’).BCE0018.
Any suggestions of what to do would be appreciated?

Javascript files are compiled before c#, so i think that is why you are getting the error. To get C# compiled before javascript place the script file inside the Standard assets folder. take a look at the following link
I hope this help.