What does this mean ?

when i’m making script to enable doorTween onTriggerEnter i always got this message.

var doorTween : DoorTween; //DoorTween is a script
var doorStates : DoorState;
enum DoorState {Open,Closed}
function Open(){
doorTween.enabled = true;
doorStates = DoorState.closed;

Assets/Standard Assets/Scripts/General Scripts/Door.js(3,17): BCE0018: The name ‘DoorTween’ does not denote a valid type (‘not found’).

what does that mean ?
and also sometimes i got this message

ArgumentException: You are not allowed to call get_gameObject when declaring a variable.
Move it to the line after without a variable declaration.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.Component.GetComponent (System.String type) (at C:/BuildAgent/work/842f9557127e852/Runtime/ExportGenerated/Editor/UnityEngineComponent.cs:126)
Door..ctor () (at Assets/Standard Assets/Scripts/General Scripts/Door.js:3)

You have your “Door script” in “Standard Assets”. That means it’s compiled before all regular scripts (all scripts outside of Standard Assets or plugins). So scripts in Standard Assets can’t use “normal” scripts. You should either move your Door script out of Standard Assets or put the other script into Standard Assets.

For more information on that subject see the manual (compilation order)

Your second exception happens because you can’t call a function when you initialize a script variable. Shortcut properties like “.transform” or “.renderer” are just function calls behind the scenes (they use GetComponent). You have to declare your variables without a value and assign the value in Start (That’s actually exactly what the error message suggests):

// UnityScript
// THIS WON'T WORK: Here you will get the error
var myVariable : Renderer = renderer;

// That's how you should do it:
var myVariable : Renderer;

function Start()
    myVariable = renderer;