Why is my variable not in scope?

On this pictures i’m creating the buttons in my gridpanel and i have the Index var.
Next i get this index and text from rich text block and it is not in the scope!
Can you tell me how to fix it?

You probably need to step into the for each body for the variable to enter into scope. I believe this is similar to this piece of code

for(int i = 0; i < MyArray.Num(); ++i) {
   // Array Element is only initialized (enter the scope) here.
   auto ArrayElement = MyArray[i];  

and in the pictures you attached the debugger is at the for line.

Hello! It is always return false, so i suppose this will not help =(

What returns false? The comparison? How many elements do you have in your array?

Oh, sorry, I have branch there.

That’s why I asked how many elements you have in your array

On the 1 pic: 32x32 loops. From 0 to 31 both arrays.

Right, this was just to rule out the possibility of you having less elements in the array then expected. In that case, are you able to put a break point in the branch itself? Since the Branch is an execution node you should be able to see the variable you want in scope.

If i understood you right i should try to add breakpoint. Here is the picture:

That was my suggestion yeah, but now I have no idea of what could be wrong, sorry about that.

@Shedels are you able to share the project? I could try to take a closer look if you can.

Got the anwer. It is because the loop has it own scope.