PlayerWeapons Messed up

Hi
I was trying to do something with weapons using the PlayerWeapons.js in the FPS turtorial but i messed it up in the progress and now i get error messages and can not run the game. Could someone give me what it should look like or a download?

Here is what i have:

function Start () {
	// Select the first weapon
	SelectWeapon(0);
}

function Update ()
{
	// Did the user press fire?
	if (Input.GetButton ("Fire1"))
		BroadcastMessage("Fire");
	
	if (Input.GetKeyDown("1"))
	{
		SelectWeapon(0);
	}	
	else if (Input.GetKeyDown("2"))
	{
		SelectWeapon(1);
	}
}
function SelectWeapon (index : int) {
	for (var i=0;i<transform.childCount;i++)
		{
		// Activate the selected weapon
		 (i == index);
			transform.GetChild(i).gameObject.SetActiveRecursively(true);
		// Deactivate all other weapons
		}
}
EOF			transform.GetChild;(i).gameObject.SetActiveRecursively;(false);
		EOF;
EOF;

EDIT by Fishman92, cleaned your code formatting.

if you havn’t done so allready, you need to create an empty game object and place it near the first person controller, then apply the script to the empty game object. then in the hierarchy view drag the weapons into the empty game object.

Technor

replace your SelectWeapon() code with the code below.

 function SelectWeapon (index : int) {
    	for (var i=0;i<transform.childCount;i++)
    	{
    		// Activate the selected weapon
    		if (i == index)
    			transform.GetChild(i).gameObject.SetActiveRecursively(true);
    		// Deactivate all other weapons
    	
    	else
    			transform.GetChild(i).gameObject.SetActiveRecursively(false);
    	}
    }

Also, just so you know, when the error console comes up with ‘expected EOF’, that means empty space. Don’t type in EOF.