MV Yanfly CBT Error

Hi!
First, I'd like to apologize for any spelling errors (English is not my first language) or inexperience. This is actually one of my first times using this, and I don't know what to do with this error.

When I decided to add the Yanfly CBT plugin to my project, I didn't really understand what was happening because... once I finished a fight, I would get this error.

Some friends also tried this project. We all had the same error, and I don't really know what to do. It might have a somewhat silly solution that I didn't even consider. I apologize in advance if it's a silly mistake.
errror_cbt.png
1) did you start a new game after adding the plugin, or did you continue an older save?
adding a plugin usually requires new game to correctly set the new plugin up, older saves are mostly incompatible.

2) did you place the plugin in its correct position in the plugin manager?
Yanfly plugins require a specific order, or they can cause the strangests of errors.

3) did you configure the plugin correctly?
"of null" means that the engine was given a reference that does not exist (is NULL)

If you can't find anything based on these questions, please give a screenshot of the plugin manager with all plugins you have and their order.
1) did you start a new game after adding the plugin, or did you continue an older save?
adding a plugin usually requires new game to correctly set the new plugin up, older saves are mostly incompatible.

2) did you place the plugin in its correct position in the plugin manager?
Yanfly plugins require a specific order, or they can cause the strangests of errors.

3) did you configure the plugin correctly?
"of null" means that the engine was given a reference that does not exist (is NULL)

If you can't find anything based on these questions, please give a screenshot of the plugin manager with all plugins you have and their order.
R1. As I explained, some friends have also tried this project to find the error, they verified this way and no, the error continues to occur.

R2. Yes, unfortunately, I've encountered a bug that was solved this way in the past. I don't know if I actually used the correct order, but I still feel it's unlikely. And if that's the reason, srry...

R3. The plugin is exactly as it came, I haven't changed or altered anything in any way...
Your Yanfly plugin load order is fine and that error would only be possible to get if specifically an enemy somehow didn't have a battler sprite. if nothing comes to mind from that, then you should do some basic troubleshooting steps.
Disable every plugin but CTB and the battle engine and see if the issue persists. If it does, then there's an issue with either the plugin or how you have it set up. Else, it's because of another plugin and you should slowly re-add them and re-test until you find the plugin that causes the crash.
The plugin is exactly as it came, I haven't changed or altered anything in any way...
then this can be the cause.

yanfly cannot know every possible game trying to use his plugins.
the default settings of his plugins are only his best guesses as what should work with most project setups.

but in a lot of cases, the plugin needs to be configured to fit your game, or it could cause problems.
you should never just add and ignore a plugins, you always need to go through the options and settings of a plugin to check if it can work in your project.
As I explained, some friends have also tried this project to find the error, they verified this way and no, the error continues to occur.
just because some friends tested the game does not mean that they didn't all used continue game option. That is why I specifically asked if someone used "new game" instead of continue.


Additionally, please check all your enemies to see if they are correctly configured for SV battlers.
And then make a new troop where you add some of those enemies to specifically test for this error.

I couldn't pinpoint it to a missing battler sprite due to me not knowing the object properties that deep into the code, but since @Robro33 pointed it out, that can happen if you misconfigured the enemies, or if you deleted an enemy the wrong way (that is, deleting the enemy while it is still in use by a troop) or a few other cases that should be checked with a clean new troop.

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-cbt-error.179641/