en5 Posted July 8, 2006 Posted July 8, 2006 I think I know what it's trying to say, that I'm calling itself in an "endless loop" and it's trying to protect me from doing that, but I'm not. It starts the function over and over until it finishes what it's doing/something changes and then it's supposed to start a new function. I'd post the code straight, but uh it's huge. The line in question I think was 527(maybe 524, I'm tired and lost interest) which is a sleep (100) command that's I guess inside the rebel function. Anyway if anyone could help me out sorting out this tangled mess of code I would GREATLY appreciate it, and so would the lots of people waiting for this to be resolved lol. Thanks a lot!en5bot.au3
Moderators SmOke_N Posted July 8, 2006 Moderators Posted July 8, 2006 (edited) You've pretty much answered your own question.... recursion is the function repeatedly calling itself, there's a limit of how many times you can do that. Edit: Here's an example of what I'm talking about:Global $CountTimesFunctionCalled = 0 While 1 Sleep(10) If Not Function() Then Function() Else ExitLoop EndIf ToolTip('Function 1 Proper call = ' & $CountTimesFunctionCalled, 0, 0) WEnd Func Function() $CountTimesFunctionCalled = $CountTimesFunctionCalled + 1 If $CountTimesFunctionCalled < 4000 Then Return 0;Returning if something isn't true, and comming back if it isn't but releasing the function call Return 1;statement is > 4000 so stop calling the function to end the point EndFunc $CountTimesFunctionCalled = 0 Function2() Func Function2() $CountTimesFunctionCalled = $CountTimesFunctionCalled + 1 ToolTip('Function2 Recursion call = ' & $CountTimesFunctionCalled, 0, 0) Sleep(10) Function2();Should die somewhere around 375 if I remember correctly EndFunc Edited July 8, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
The Kandie Man Posted July 8, 2006 Posted July 8, 2006 Straight from the FAQ of the help file: "Maximum depth of recursive function calls: 384 levels" Search for "limits" if you can't find it. "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire
Moderators SmOke_N Posted July 9, 2006 Moderators Posted July 9, 2006 Straight from the FAQ of the help file:"Maximum depth of recursive function calls: 384 levels"Search for "limits" if you can't find it.Ha, thanks teach... Knew I'd seen it somewhere, surprised I was that close. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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