Problem with adding 1 element of an array to a list

well the tiltle says it here is the error i get: Assets/scripts/AddItem.js(29,28): BCE0048: Type ‘System.Type’ does not support slicing.

here is the script where the item is what i want to add.

#pragma strict

import System.Collections.Generic;

var Inventory : PlayerInv;
var GUISKIN : GUISkin;
var Weapons : WeaponInfo[];
class WeaponInfo
{
   var GO : GameObject;
   var name : String;
   var icon : Texture2D;
}

function Start ()
{
	Inventory = GetComponent(PlayerInv);
}

function OnGUI()
{
	GUI.skin = GUISKIN;
    for(var Weapon : WeaponInfo in Weapons)
    {
      GUILayout.Label(Weapon.icon, GUILayout.Width(300));
      if (GUI.Button(Rect(0,0,306,156),""))
      {
     	 Debug.Log("You Choose The AKS74U");
     	 Inventory.Inv.Add(WeaponInfo[0]);
      }
    }
}

here is the script where i want to add it to:

import System.Collections.Generic;

var Inv = List.<itemclass>();

function Start () {

}

function Update () {

}

You’re trying to add the class WeaponInfo with a slicing, instead of the variable at Weapons[0].

Inventory.Inv.Add(Weapons[0]);

Also do note that the list Inv is of type itemclass, the thing you’re trying to add is of type WeaponInfo.