I cannot figure out whats wrong with this script(Javascript)

Hello. I was wondering what I am doing wrong here?

import System.Collections.Generic;

//inventory//
var items : item[];
//compares inventory with online database and links them//
var maininven : List. = new List.();

function Start () {

   maininven .add(items[0]);

}

function OnGUI () {

}

It needs this script to work (and I have not added anything to the gui yet).

public class item {
 var Name : String;
 var desc : String;
 var Stam : int;
 var Power : float;
 var attkspd : float;
 var rarity : Rarity;
}

enum Rarity {
  Stock,
  Common,
  Lesscommon,
  Uncommon,
  Rare,
}

However,When I start it up I get.

MissingMethodException: System.Collections.Generic.List`1[[item, Assembly-UnityScript, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]].add
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher ()
Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.Create ()
Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object args)
Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object args)
Boo.Lang.Runtime.RuntimeServices+c__AnonStorey14.<>m__7 ()
Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.Invoke (System.Object target, System.String name, System.Object args)
UnityScript.Lang.UnityRuntimeServices.Invoke (System.Object target, System.String name, System.Object args, System.Type scriptBaseType)
Inventory.Start () (at Assets/scripts/Inventory.js:10)

Could someone please take a look at this and tell me what I am doing wrong?

The UA formatting seems to have eaten the List type, but I suppose it was item. The problem you’re having probably is caused by add, which should be Add:

import System.Collections.Generic;

//inventory//
var items : item[];
//compares inventory with online database and links them//
var maininven : List.<item> = new List.<item>();
 
function Start () {
 
   maininven.Add(items[0]); // it's Add, not add
 
}
 
function OnGUI () {
 
}