Error on creating an Array

Hola ! i try to create a series of images, but it comes out error, this is my code

#pragma strict
var images : Texture2D[5];

function OnGUI () {
	for(var i=0;i<images.Length;i++){
		GUI.DrawTexture( Rect(50 + (0.5f*i), 10, 100, 100), images*);*
  • }*
    }
    i put it on my Main Camera, and when i press Play, this error comes out
    Assets/testing/testingScript/testingarray.js(2,23): UCE0001: ‘;’ expected. Insert a semicolon at the end.
    it’s so annoying… i don’t know why it says i need to put “;”. I see that everyone asking about array of images comes out with this answer, var images : Texture2D[5];
    anyone could help me? or array is the feature of Pro version Unity?

Line 2 should be:

var images : Texture2D[] = new Texture2D[5];

Note variables are public, so after attaching this script, any further changes in size will need to be done in the inspector. You could have just done:

var images : Texture2D[];

Then set the size and initialized the array in the Inspector.