You have too many deeply nested procedures. Every time your code jumps to a procedure, the contents of its local variables are pushed onto the stack. The stack is a working area of memory that grows and shrinks in size dynamically with the demands of your executing script.
To correct this error