Simple array usage

Can someone please tell me why this code doesn't work and show me how to fix it?

var TileNumberArray;           
TileNumberArray = new int();
TileNumberArray.Length = 80;

static var ResetButtonSetting = 1;

function Update () {
    for(TileArrayChoice=1;TileArrayChoice < TileNumberArray.Length; TileArrayChoice++);
    {
    TileNumberArray[TileArrayChoice] = ResetButtonSetting;
    }

}

I'm a noob at programming but this really should work as far as I can tell. The error code I get is as follows;

resetDialScript.js(12,42): BCE0044: expecting :, found '='.

Any help would be greatly appreciated.

"It's enough to make you chew your own foot off" - John Cleese

ok well there are lots of problems in our code...

1# array.length is not capitalized.. and it is read only so you cant mod it in scripts;

2# your var should look like this:

var TileNumberArray : int[]; 

i'm not sure if these problems are the real problems because i'm a noob to ;).

hey there :)

i think array length is readonly!

and you cant say array=single_value

use array[index]=value instead

for (int x=0;x< TileNumberArray.Length;x++)

i would suggest learning programming concepts VERY WELL b4 diving into the deep sea of unity :) good luck!

Thanks for trying but there is no problem with the "Length" parameter, only the first letter needs to be capitalised, several variations show this is the only spelling that unity recognises as an internal command-thingy.

Removing the "new" before "int[]" has done nowt.

The problem points to this line;

TileNumberArray[TileArrayChoice] = ResetButtonSetting;

Again, your help was appreciated, ty

Remove the extra semicolon on the line where the loop is declared:

var TileNumberArray;           
TileNumberArray = new int();
TileNumberArray.Length = 80;

static var ResetButtonSetting = 1;

function Update () {
    for(TileArrayChoice=1;TileArrayChoice < TileNumberArray.Length; TileArrayChoice++) // ; <-- removed
    {
    TileNumberArray[TileArrayChoice] = ResetButtonSetting;
    }

}

== [Addendum] Now that the script actually compiles you will be able to run it. This will give you some new errors which indicate that early responses you got were also on the right track: the length parameter should not be capitalized, and the array declaration should be

TileNumberArray = new Array();

For reference, see the documentation page on Arrays.

Again, huge thanks to all those who have helped. For the sake of completion here is the finished code that provides no errors during runtime or otherwise;

var TileNumberArray;           
TileNumberArray = new Array();

var TileArrayChoice;
static var ResetButtonSetting = 1;

function Update () {
    for(TileArrayChoice=0;TileArrayChoice<81; TileArrayChoice++) 
    {
    TileNumberArray[TileArrayChoice] = ResetButtonSetting;
    }

}

whether it actually does what I expect it to do remains to be seen :-)

Again, a huge thanks to all

"I can see clearly now the rain has gone, I can see all obstacles in my way" - Johnny Nash