Sign in to follow this  
Followers 0
kor

loop encounters an error, then starts over

4 posts in this topic

My code is several hundred lines but I'm wondering if anyone has seen this behavior before that might give me some ideas for stuff to look for in my code.

Here is what it is doing.

I have a loop that reads a a couple of lines of input.

It then runs functions on each line inside the loop.

what I am seeing is that if there are lets say 5 lines.. it will run fine for lines 1 and 2. then it encounters an error on line 3 because of some reason or another... well, instead of continuing on to line 4, it starts over and tries to do lines 1-3 again (erroring on all 3 lines) before it finally moves on to line 4.

Any idea what might cause this?

Share this post


Link to post
Share on other sites



Hello kor,

With 332 posts, you should well know by now, that without providing an example of materials and a reproducer script, that it would be tough for most here to give you help. All we could do is guess at this point, however guessing is made even more difficult when you don't even describe how your reading these lines like via FileReadLine(), or a line taken from _StringBetween() or from an array or from StringRegExp(). Try including a reproducer script, and explain what your goals and objectives are. You will find that help will be more defined to your situation, and faster in response.

Realm


My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

What, like this one?

;)

you got me. I suck at loops sometimes.

I figured out that my problem was I couldn't continue the loop because the loops calls other functions.. so I just used SetError(1) in the function, then at the outside part of the loop I did an If @error Then ContinueLoop

Seems to have fixed things.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0