kor Posted April 1, 2012 Posted April 1, 2012 (edited) _AD_Open() If $bDebug = True Then _GUI() ; run gui if debug mode is true _Format($sCSV) ; format csv file For $i = 0 To UBound($aInput) - 1 ; run broker loop If $bDebug = True Then $iBarCount = 0 ; reset main progress bar back to zero _Broker() If $bDebug = True Then $iStep += 100 / (UBound($aInput, 1) - 1) ; step progress bar each loop by number of rows divided by 100 GUICtrlSetData($hBulkBar, $iStep) EndIf Next _AD_Close() I'm not sure why. It's just a simple loop but it will start at the bottom, and it only gets 2 rows into things and just starts over and over and over. If you need the ENTIRE script let me know but I'd rather not post the whole things. It's hundreds of lines and I'd prefer now to have to go through it and remove all the confidential info. Edited April 1, 2012 by kor
Xandy Posted April 1, 2012 Posted April 1, 2012 (edited) is $i a local variable?if _Broker() modifies $i and $i just happens to be global that could cause a infinite loop.Also report the value of UBound($aInput).You said it does 2 rows, do you mean $i= 1 when it starts the looping over. I really don't know, but that's how i'd debug the bastard.remark the _Broker(). and report $i by placing this line in the loop;_Broker() consolewrite("$i= "&$i&@lf) Edited April 1, 2012 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker)
Realm Posted April 1, 2012 Posted April 1, 2012 Hello kor, Your provided example appears to have no problems in it. The problem must be somewhere else. But with so little to go on its hard to even guess what it could be. The only 'stab in the dark' I have is a question of wether your variable $i is declared globally somewhere? If so, does your function '_Broker()' also have use for the variable $i? 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.
kor Posted April 1, 2012 Author Posted April 1, 2012 Yes, the Broker function reads $i in various parts. I fixed things by just moving the For Next loop inside the Broker function and running it there. Solved the problem. Thanks.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now