Jump to content

Recommended Posts

Posted

hi all,

i am writing a small bot for an online game.

It works fine but in a couple of hours i am getting this annoying "stack over flow error" that crashes my script.

I read about it on this forum that error happens when u have functions calling it self many times, and thats exactly what i am doing

any help?

Posted

Yeah there's a really simple way to fix that. Stop doing that. Put the function call in a while loop, it's bad practice and you should NEVER have a function calling itself.

Posted

Yeah there's a really simple way to fix that. Stop doing that. Put the function call in a while loop, it's bad practice and you should NEVER have a function calling itself.

I wouldn't say "NEVER" because when dealing with references function calling itself is sometimes the only way to reach the end of the sequence.

But I'm sure that's not the case here.

♡♡♡

.

eMyvnE

Posted

Yeah there's a really simple way to fix that. Stop doing that. Put the function call in a while loop, it's bad practice and you should NEVER have a function calling itself.

Ever heard of recursion? Not so wierd, when done right afcource.

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
  • Recently Browsing   0 members

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