Custom Effects with YEP's Buffs & States core - Error recognizing "null"

Hi there,

I have created a state in my game that makes use of YEP's Buffs & States Core plugin, with note tags.

See the code I've used below:

Spoiler
<Custom Action Start Effect>

if (Math.randomInt(100) >= 50) {

this.currentAction().clear(); //Clear battler current action.

BattleManager._subject = null; //Set current battler to null, canceling the battler's action.

}

</Custom Action Start Effect>

When this is successful (meaning, the random value is greater than or equal to 50), I get this error message:

Spoiler
1587456583567.png

Does anyone know what's going on?

The intended effect is for the afflicted actor's, or enemy's turn to be void and their actions cancelled until their next turn (where if the state is still applied, the code will be executed again).

Thank you!
I think you can use THIS instead. It will cancel the turn of the current actor or enemy right before the moment they start their action, and all items used, MP costs will be consumed. Just configure a bit and it will serve your purpose, I hope.
I think you can use THIS instead. It will cancel the turn of the current actor or enemy right before the moment they start their action, and all items used, MP costs will be consumed. Just configure a bit and it will serve your purpose, I hope.

Thank you @JamesRyan , I'll be giving this a test.

In the event that the above plugin isn't compatible with my other plugins, does anyone have s solution that could work with Buffs & States core?
Thank you @JamesRyan , I'll be giving this a test.

In the event that the above plugin isn't compatible with my other plugins, does anyone have s solution that could work with Buffs & States core?
Don't worry. What I suggested you is not a plugin. It is a "tip & trick" made by Yanfly himself, and using only his Buffs & States Core plugin. You can simply copy/paste his codes and configure it.
Oh goodness, sorry @JamesRyan ! I should have read the blasted thing properly. Thanks so much!

Original thread: https://forums.rpgmakerweb.com/threads/custom-effects-with-yeps-buffs-states-core-error-recognizing-null.120468/