rakarna Posted April 12, 2009 Share Posted April 12, 2009 (edited) hello i have some problems with owerflowes in my scribt. a guy told me "You are calling UDFs indefinately without letting them finish." so i wunder what is a UDF. here is my scribt if someone wants to see it. (it is kind of long ^^) ; Loop around until the user gives a valid "autoit" answer Edited April 13, 2009 by rakarna Link to comment Share on other sites More sharing options...
rakarna Posted April 12, 2009 Author Share Posted April 12, 2009 the problem is that i get owerflows and the scribt stop working Link to comment Share on other sites More sharing options...
Authenticity Posted April 12, 2009 Share Posted April 12, 2009 Can you post the error log? Link to comment Share on other sites More sharing options...
rakarna Posted April 12, 2009 Author Share Posted April 12, 2009 C:\Documents and Settings\Mattias\Skrivbord\Ladderslasher catacomb bot 100% mattias ^^.au3 (140) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.: sleep(1000) >Exit code: 1 Time: 10971.944 Link to comment Share on other sites More sharing options...
Authenticity Posted April 12, 2009 Share Posted April 12, 2009 It seems like you keep calling but almost all the functions just doesn't return and keep calling them-self until you get the overflow error. You need to reprogram it in a way that it's conditional and doesn't involve a recursive call without returning eventually. Link to comment Share on other sites More sharing options...
rakarna Posted April 12, 2009 Author Share Posted April 12, 2009 sorry but i dont really understand what you mean Link to comment Share on other sites More sharing options...
Mat Posted April 12, 2009 Share Posted April 12, 2009 basically, I think the script needs tidying... stuff like: run("C:\Program Files\Mozilla Firefox\firefox.exe"); öppnar fire fox sida sleep(4000) klar MouseClick("left",394, 58) ; klickar på där man skriver in addressen sleep(100) ;väntar Send("http://ladderslasher.d2jsp.org/lsfs.html"); skriver in addressen till ladderslasher sidan sleep(2000) Send("{ENTER}") why do this when you could just do: ShellExecute ("http://ladderslasher.d2jsp.org/lsfs.html") WinWaitActive ("d2jsp - Ladder Slasher - Mozilla Firefox") its this kind of stuff that leaves you with more room for error, and means the script actually works under more circumstances. In your script your using way too many constants, use more conditional statements (thats If...Then...EndIf etc.) this will make your script more flexible. You are just trying to mimic human input, thats ok, but humans can adapt to errors, a script asked to mouse click in a particular place can only click in that place. also instead of Call("attack1") use attack1 () I havent run It as I don't have a clue what ladder slasher is, but just neaten the script and try to get the computer to do what you want it to do, rather than try and make it mimic you. when you've cleaned it up, it will be easier to see errors. AutoIt Project Listing Link to comment Share on other sites More sharing options...
rakarna Posted April 12, 2009 Author Share Posted April 12, 2009 ok thanks very much i will try to clean up my scribt with the tips you gave me 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