For loop problems

Here's one of my stupid mistakes, enjoy: