More than one row in an array not displaying in a FOR loop

Hello everyone.

I've got 5 columns and over 1300 rows of data which I've managed to retrieve into an array called: resultArray. I'm using the following loop to try and display each row into a corresponding GUIText variable:

        for (var value : String in resultArray)
    {
        hud.openPrice = resultArray[0];
        hud.highPrice = resultArray[1];
        hud.lowPrice = resultArray[2];
        hud.closePrice = resultArray[3];
        hud.volumeNum = resultArray[4];     
        yield WaitForSeconds (1);           
    }

I get the first row of data to display perfectly, however, every subsequent row doesn't display. What am I not doing?

Your loop is just doing the same exact thing over and over again, by assigning the first five entries in "resultArray" to the "hud.*" variables. Presumably you want to do something with the "value" variable, which is currently going unused.

Eric,

Thanks for the insight, here's the working code:

    for (i = 0; i < resultArray.length; i += 5) 
    { 
        hud.openPrice = resultArray*;* 
 *hud.highPrice = resultArray[i+1];*
 *hud.lowPrice = resultArray[i+2];*
 *hud.closePrice = resultArray[i+3];*
 *hud.volumeNum = resultArray[i+4];*
 *yield WaitForSeconds (1);*
 *}*
*```*