Vector3 not updating in for loop

Here is my code, brick_col is updating itself as it should be, print(brick_col), tells me once the loop is complete brick_col is +1 itself, but, print (positions ), tells me my y value is always 0) the Vector3 isn’t being updated with the value. Any ideas? Many thanks
```csharp
*using System.Collections;

using System.Collections.Generic;

using UnityEngine;

public class Brick_Spawn_Test : MonoBehaviour {

List<Vector3> positions = new List<Vector3>();

private int bricks_in_row=9;

public GameObject Brick;

private int no_in_row=9;

private int brick_col=0;

private int number_of_brick_col=2;



void Start(){

    Check_Bricks ();



}





void Check_Bricks(){

    if (brick_col != number_of_brick_col) {

        print ("not enough bricks");

        Create_Bricks ();





    }





}





void Create_Bricks(){

    for (int i = 0; i <= bricks_in_row-1; i++)

    {

        for (int a = -4; a <= no_in_row/2; a++)

        {

            positions.Add(new Vector3(a,brick_col,0f));

        }

        print (brick_col);

        print (positions [i]);

        transform.position = positions[i];

        Instantiate(Brick,transform.position, transform.rotation);



    }

    brick_col = brick_col + 1;

    Check_Bricks ();

}

}*
```

I’m not sure what you expect to happen.

Perhaps you’re a little confused. Vector3 is a struct, so it’s a value type. The values you pass into it (floats) are value types as well. If you create a new vector in that loop with y=brick_col (which is 0 during the first invocation), all created vectors will have a y-value that is 0.
If you change brick_col afterwards, that will not take any effect on the vectors that you create before.

Your code is very chaotic, you can tell us what is your goal and I am sure that someone will help you to write a better one.

Anyways, your

print(positions [i]);

is not printing currently created brick.

To get a current brick you should access it like this:

print(positions.Last());

And consequently there are more bugs comming from this mistake.