Sign in to follow this  
Followers 0
rakarna

UDF and include?

8 posts in this topic

#1 ·  Posted (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 by rakarna

Share this post


Link to post
Share on other sites



the problem is that i get owerflows and the scribt stop working

Share this post


Link to post
Share on other sites

Can you post the error log?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

sorry but i dont really understand what you mean :D

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

ok thanks very much i will try to clean up my scribt with the tips you gave me :D

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