Array index is out of range (Javascript)

OK, so i have this simple inventory script and for some reason i get this error when i hit the play button and then try to click.

IndexOutOfRangeException: Array index is out of range. Inventory02.Update () (Assests/script/inventory02.js:11

From the error i assume it is on line 11 but there is nothing with an array on that line!
I really need some help on this!

Error on line 11…i think

#pragma strict

var Player : Transform;
var material : int;
var Static : int = 1;
var ItemTexture : Texture;
var NewText : Texture[];

function Start()
ItemTexture = NewText[material];

function Mining(Character : Transform)
Player = Character;
Static -=1;

function Update()
if(Static <=0)

Once try with Replace line number 11 with ItemTexture = NewText[0]; and try.