stack level too deep

*Translator used

Hello, I'm writing because I have a problem recently.


With Common Events and Enemy Group Events

Write 1 in variable 33 (as a variable manipulation event)

Through script functionality

$game_party.add_actor($game_variables[33])

I let you do that

The error statement "stack level too deep" appears.


I made a new project and tried it just in case, but it worked well without any problems.

I also checked if I applied more than one script, but I didn't.


What's the problem?
the problem in question is the program calling the same function over itself to infinity.

what needs to be established, is that instruction being the problem, or maybe it triggering the problem via a 3rd party's plugin.
you got any?
the problem in question is the program calling the same function over itself to infinity.

what needs to be established, is that instruction being the problem, or maybe it triggering the problem via a 3rd party's plugin.
you got any?
1649475115457.png

First of all, we've set up only two of these for Common Events.

After doing this, I tried to run it after specifying the scope of the skill as a user, but a stack level too deep error occurred.


Similarly, when the enemy group ended the turn, we tried to set up and run only the same two pictures, but the same error occurred....
Stack level too deep means you keep calling the script function recursively and infinitely...

some that might caused that problem:
- installing more than one SAME script
- installing two or more conflicting script with bad design and causing the recursive function call.

from your post you said it WORK in fresh project... that means your installed script is the problem...
try disabling some of your script until you narrow down the culprit... it will be super hard to help you if you did not narrow down the script causing it first...

hope this help.
Follow the link "how to use a script" in my signature to the bughunting section
install the backtracer script linked there
then get the error trace from the console when the error next pops up

this will tell you which scripts are involved in the recursive call and help you solving it

Original thread: https://forums.rpgmakerweb.com/threads/stack-level-too-deep.146576/