Jump to content

plz help me improve the code


rtk217
 Share

Recommended Posts

plz help me improve this code

and also answer my question something in this code crashes after a while with error about recursive function

even though i havent set up any recursive functions at all.

any improvement to the code will be helpful

ohh and ignore the messy GUI thats not the problem here

can u plz tell me about the function of memopen, memclose, memwrite, memread

what variables should i put inside those and what will this functions return

here is the link to au3

http://planet.nana.co.il/rtk217de/macrosjmem.au3

Edited by rtk217
Link to comment
Share on other sites

plz help me improve this code

and also answer my question something in this code crashes after a while with error about recursive function

even though i havent set up any recursive functions at all.

any improvement to the code will be helpful

ohh and ignore the messy GUI thats not the problem here

dude thats a long code to check, upload the au3 file and post the link in the topic here, that would help

Link to comment
Share on other sites

Your link is down so i cant have a look at your code ... Although from what i read a look wouldnt be enough...

I suspect that you either use a continuously growing array (_ArrayAdd maybe) or creating new variables until AutoIt reaches its limits....

Link to comment
Share on other sites

ok the exact error is:

recursion level has been exceeded - autoit will now terminate program in order to prever stack overflow.

Made some changes, you are calling the function main repeatedly, i believe that's the recursion problem, can't test this but this might fix your problem, also added _Exit function, and updated _IsPressed function so that dll is only opened 1 time and then closed upon exit.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

naaa still have the recursive problem

im thinking of reprogramming this program

maybe make an include file with some of the commands in function main.

u are correct its main that causes this to happen

but i still dont understand why, the function doesnt call it self or inherit itself.

meanwhile i did that after 300 runs of function main ( i read in the help file of autoit that recursive maximum is 384) the program restarts itself.

plz i need something better

Link to comment
Share on other sites

Ok, lets follow the path.

setup is called

block or main is called

if block is called, main is called from block

in main

if attack is called from main, attack calls main, hmmm recursion?

probably more.....

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

man iyt doesnt happen at the spot

it happens after like 30 minutes of the program running

im thinking myself

recursion is a function that calls itself or a function that calls another function to call her but uses inhertiage of its own defined variables.

there is no recursion

should i write another func that will be called from attack and then call main?

i really dont know where this gone wrong

Edited by rtk217
Link to comment
Share on other sites

well at first attack was part of main

so i think im gonna put that back in main and improve some functions in the code.

any suggestions how to make it more efficiant in resources and size?

ok this is the new code hope it will work without bugs!

mse.au3

Edited by rtk217
Link to comment
Share on other sites

I don't know if this will actually help make it more efficient or not, but maybe grabbing only the functions you need from your include files and putting it in your code instead of including the whole file. This way, it's only including the lines you need for your code, and not the hundreds of lines that you won't use anyway (because when you #include a file, it will append that whole file to your script when you make it a .exe

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...