Jump to content

Stack overflow


[DMC]

Recommended Posts

hey,

i got a script for the admins when i do /admins it says

Level 10=

level 9=

etc

but when i do this its saying stack overflow :mrgreen:

im not comfortable with posting this

so im just asking what this error means :|

there are at lest two ways to prevent this:

1) Proper Tail Call

function a()  
 return a()  
end 

Because a proper tail call uses no stack space, there is no limit on the number of "nested" tail calls that a program can make. For instance, we can call the following function with any number as argument; it will never overflow the stack.

2) setTimer function

function a()  
 setTimer (a,50,1)  
end 

i always use "setTimer" method myself, ofcourse the interval may be difrent than 50 (50 is minimum)

Link to comment

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...