Guest USMarine Posted May 9, 2004 Share Posted May 9, 2004 I have the following "random" error, minus the ::Error and ::EndOfError. This used to work, and now... it doesn't? The error is, Until $NeverEnding = 2 "Until" statement with no matching "Do" statement.' End of Error Here is the code causing the error... ; Initialize Global variables Global $RndJoke = 0 Global $PrevJoke = 100 Global $NeverEnding = 1 ; Start the main script Do Do $RndJoke = GenerateRndNumber() Until $RndJoke <> $PrevJoke $PrevJoke = $RndJoke Call("Joke" & $RndJoke) If $RndJoke = 0 Then GenerateRndNumber() EndIfPussy Sleep(600000) Until $NeverEnding = 2 Func GenerateRndNumber() $RndJoke = Int(Random(6)+1) Return $RndJoke EndFunc Link to comment Share on other sites More sharing options...
Developers Jos Posted May 9, 2004 Developers Share Posted May 9, 2004 (edited) here's your script processed with Tidy: Notice the "EndIfPussy" statement ; Initialize Global variables Global $RndJoke = 0 Global $PrevJoke = 100 Global $NeverEnding = 1 ; Start the main script Do Do $RndJoke = GenerateRndNumber() Until $RndJoke <> $PrevJoke $PrevJoke = $RndJoke Call("Joke" & $RndJoke) If $RndJoke = 0 Then GenerateRndNumber() EndIfPussy Sleep(600000) ;### Tidy Error: Level error -> Until is closing previous If Until $NeverEnding = 2 ;### Tidy Error: Level error -> Func cannot be inside any IF/Do/While/For/Case/Func statement. Func GenerateRndNumber() $RndJoke = Int(Random(6) + 1) Return $RndJoke EndFunc ;==>GenerateRndNumber Edited May 9, 2004 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Guest USMarine Posted May 9, 2004 Share Posted May 9, 2004 Yeah, I see that now, thanks. HAHA, guess my friends got away with another one at MY expense. Link to comment Share on other sites More sharing options...
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