C++ if statements are ignored

So im working to create a system that loops through and spawns actors. However I want it to spawn a different actor first then spawn the regular variety. to do this i have a for loop that loops through until its spawned the right number of actors. Issue I’m having is that it ignores all if statements so I cant spawn the starting room actor. I’ve debugged it to the if statements being the problem. Ive tried it running in Begin play and a seperate function that is called but it still fails at the if statements.I know that the spawning code is good as if i put it in the for loop outside the if statements it spawns the correct numbers. I’ve been coding a while but only recently started using C++ in unreal so I’m assuming I’m just missing something about unreal, that or being a spanner.

here is the code snippet any help would be greatly appreciated.

Well looks like Unreal was having a moment after the 3rd restart it is now working as it should. So if any one does have this issue, I solved it by closing the unreal editor leaving Visual studio open, recomplied it and ran it from VS and it seemed to work, reopend the Unreal project and its now working as planned.

I’m having the same issue but mine doesn’t work even after I rebuild. This is really odd