That’s not going to work. You are Iterating on APlayerController and then trying to cast it to a ASBaseCharacter. Unless you have extending PLayerController with your character class name which would be really confusing. Iterate on the Characters, or Get the ControlledPawn from the Controller and then cast that result.
Yes on the loop simplification, that’s what I meant. You can do it all in one shot. Sugestion though is initialize the pointer to 0 at the start and make sure you test the result because it can be NULL.