next takes a label as a parameter. There are no labels in your code.
you do not indent the code. Once you are advanced enough to use loops, please also learn to indent the code. Without indentation, your code becomes write-only, unreadable mess for humans.