I want to
1) extract data from three different location of a array;
2) and average them;
3) and assign the result into another array
using the code below
updatedtargetNodes(1)(count5)=(Rhino.PointScale(referenceNodes(1)(arrNodeIndex(0)(count5)),1000)+Rhino.PointScale(referenceNodes(1)(arrNodeIndex(1)(count5)),1000)+Rhino.PointScale(referenceNodes(1)(arrNodeIndex(3)(count5)),1000))/3

The problem is that the code does not work. Actually I feel diffcult to perform some maths opearions due to my limit knowledge about Rhinoscript.
Cold you please give me some clues about it? Thanks.