You attempted to use the continue statement outside of a loop. The continue statement can be used only within the body of a:
To correct this error
Make sure the continue statement appears within the body of a:
Continue | Controlling Program Flow | Troubleshooting Your Scripts