RMMV After battle defeat Game has encountered a bug

Hey,

so, I wanted to do a battle, where you loose, without it being game over afterwards.
When I tried it out, i got that message.

help.png

[/SPOILER]

Any idea what could have went wrong there?


EDIT:
Nevermind, after looking through all files again, i noticed that all my states were gone, so my game tried to put my character in knockout but that was not there anymore... I think.
It works now, was a simpler fix than i though.
These are two different things.

the error points to a problem with plugins - either a plugin installed twice, or two plugins in the wrong order or two inconmpatible plugins.
To help with solving that, screenshots of your plugin manager would be a start.


That however has absolutely nothing to do with your original question.
The ability to loose a battle is built-in into eventing. just make the battle processing command on the event and check the "can lose" box, then determine what happens if the player loses in the added branch after the battle processing.

You only need to use a plugin if you want to continue after a random battle.
Hey,
thanks for to help.
But as stated in the edit, found the error myself, don't have that problem anymore.

Plugins where my first guess, since I added a few new once, but they were at least in the right order and all yep plugins, so that should not have been a problem anyway.
The point is, what Andar said is correct - that error message would not happen because your database is missing a state.

Obviously, if everything is working correctly you can't really troubleshoot something that no longer exists. But there might be something else lurking in your project - that error can be caused by accidentally including a plugin twice as Andar said, or as an error with code you've typed into a parameter or notetag that references itself.

Good luck with your project.
@eliaelia123 a missing state cannot cause a call stack error at all.

It might trigger something like that if you have massive notetags on your states that might create loopsin plugins, but even then the error is somewhere else.
Mhm.. haven't though about it that way, but I guess you are right about that.
If the error accurs again, maybe I'll find something which hints what it is.. but since I did not change the plugins and it worked that should not be the problem.. I think.

@ATT_Turan "...parameter or notetag that references itself."
What do you mean with that? I did add notetags things after adding the.. yanfly skillcoldown, sidevsenemies and such things, so I would go over those again if you tell me what exactly could go wrong there.
.parameter or notetag that references itself.
To understand that, you'll need some background in programming.

The call stack is basically a list of return adresses - whenever a program enters a function, it stores the adress from where it came on the stack. And when the function is complete it returns to the top adress on the stack.

The stack is large enough for several thousand adresses, so the only way to exceed it is to have a recursive function that calls itself, going deeper and deeper into its own structure.
And something referencing itself is one way to create such a recursive loop.
Well, I doubt that I will find it anytime soon, so I will see what the future brings in that case.
Many thanks anyways, if it happens again I at least have a clue what the errors could be.

Original thread: https://forums.rpgmakerweb.com/threads/rmmv-after-battle-defeat-game-has-encountered-a-bug.156551/