Error when declaring Array

Hi guys another Newbie here thanks in advance for helping…

I am trying to assign an : Collider array element before comparing its components.
I am getting the “It is not possible to invoke an expression of type ‘Array’.” error. I have read that error is misleading and usually means my systax is incorrect or I am missing something…

The documentation notes that Physics.OverlapSphere() returns colliders, so I am declaring a :Collider var and from that I should be able to get a gameobject, and thus access the gameobjects.GetComponent(str) var I want to compare.

Do I even need to assign the collider from the array or can I keep it in there?

function GetStr (){		//Get the closest 5 nodes including current node, get the str of all of them and return 
						//the highest. Get the highest nodes gameobject.transform. save the gameobjects transform 
						//in an waypoint array. move to the next node. Untill reaching destination. 
						//Advanced - (Disp[lay all routes to Destination. cull to the top 3 routes. Then check for
						// traffic and choose route computed with traffic.
						//In order to choose multiple routes I will have to mark used nodes to not be used again in 
						//future loops. ( this will need a function to give a value to intersections to be used multiple times)
						// perhaps a value of how many beighboring nodes. so a street will have a node left and right 
						// while a intersection will have 3 or 4 depending on the cross roads... 
	var strongest	:int = 0; 	// set the lowest node to compare with (to be updated with curStr when availiable)
	var curStr 		:int;		// the current node being analyze
	var proxNodes = Array (Physics.OverlapSphere(transform.position, range));	// get collider of nearby nodes
	for (var i in proxNodes){													// loop through the node array
			var curArray:Collider = proxNodes(i);								// Declare and assign curArray as type :Collider
				if (curArray.GetComponent.str)									// get around null , probley not needed but good habit
					 curStr = proxNodes(i).GetComponent.str;					// assign the str var from each node ot be tested
					if(curStr > strongest) strongest = curStr;					// compare each str value and replace the highest value ot "strongest 

You don’t want to use Array. Physics.OverlapSphere already returns a Collider array, as you can see in the docs, so just do

var proxNodes = Physics.OverlapSphere(transform.position, range);

Also, that’s not a correct use of a for/in loop, and you must supply the name of the Component you’re actually getting when using GetComponent.

for (var proxNode in proxNodes) {
    var script = proxNode.GetComponent(InsertCorrectNameHere);
    if (script) {
        if (script.str > strongest) strongest = script.str;