Unity 3.0 help mee

Hello, i have just downloaded unity 3.0 and imported my old project into it.it updated my project and when it opened my project i had to attach my scripts back to all my objects. now the problem is on my main menu. the problem is i have entered this following line in to my script:

menuItems[MenuItem].OnSelected(true);

this line of code is just informing my game object to select the first menu item when the game loads. now in unity 2.6 this worked fine but as soon as downloaded 3.0 this error message keeps coming up:

Assets/Standard Assets/Scripts/MenuManager.js(14,21): BCE0019: 'OnSelected' is not a member of 'UnityEditor.MenuItem'.

CAN ANYONE PLEASE HELP ME

here is the script that is making the first object selectable:

var menuItems: MenuItem[];

var MySong: AudioClip;

var MySong2: AudioClip;

var currentMenuItem: int = 0;

var KeyDelay: float = 0.25;

function Start()
{
AudioSource.PlayClipAtPoint(MySong2,transform.position);

var lastMenuItem: int = currentMenuItem;

menuItems[MenuItem].OnSelected(true);

while(true)
{
if(Input.GetAxis("Vertical") > 0.9)

{
AudioSource.PlayClipAtPoint(MySong,transform.position);

lastMenuItem = currentMenuItem;

            currentMenuItem--;
            if(currentMenuItem < 0) currentMenuItem = 0;

            if(lastMenuItem!= currentMenuItem)

            menuItems[lastMenuItem].OnSelected(false);
            menuItems[currentMenuItem].OnSelected(true);

            yield new WaitForSeconds(KeyDelay);

    }
    else if(Input.GetAxis("Vertical") < -0.9)
    {
    AudioSource.PlayClipAtPoint(MySong,transform.position);
    lastMenuItem = currentMenuItem;
    currentMenuItem++;

    if(currentMenuItem >= menuItems.length) currentMenuItem = menuItems.length - 1;

            if(lastMenuItem!= currentMenuItem)
menuItems[lastMenuItem].OnSelected(false);
        menuItems[currentMenuItem].OnSelected(true);

            yield new WaitForSeconds(KeyDelay);
        }
        yield;
        if (Input.GetAxis("NewGame")){

        Application.LoadLevel (1);

        }

}

}

Had the same problem, i changed my scripts name and designed the array again. Started to work for me at least. Seems unity 3.0 really have something called MenuItem already. Noticed that it highlited the MenuItem in the script, was kinda odd. Hope this helps.

This may sound dumb, but, try changing the name of the .js script. Maybe Unity 3 has a menu manager of it's own. I don't know. Just a quick suggestion.

The error is occurring in a standard asset. Try upgrading the Standard Assets- this should replace the old script with one that was written for Unity 3. (I'm assuming that you didn't edit any of the standard assets- if you did, then this would overwrite your changes to them.)

Instructions for upgrading Standard Assets can be found at the bottom of this manual page.

Apparently menuItems[] is an array of MenuItem. But the reason everyone is so confused is that your examples don't look much like Unity's editor MenuItem's. For example, those are used with static functions, and yours aren't.

I'm wondering if maybe your code had its own MenuItem class, and during the conversion it got lost or is now getting overridden by the Unity or .NET MenuItem classes.

Go back to the original Unity 2.6 project and search through all the scripts (filenames and contents) for the string "MenuItem". If there is a class named MenuItem then make sure the same file(s) are in the Unity 3 project. You might also consider renaming your MenuItem class.

(Whatever you try, make sure you keep an unedited copy of the working, unconverted 2.6 project! That's your baseline as you try to get the Unity 3 version working.)