Yanfly Death Skill

Im trying to figure out the issue and im getting is this error (the death is suppose to succeed or miss on non-bosses but its showing damage numbers instead) and then i ended up with this error (the black bar is covering non-important stuff
25287287_152399015400665_1420632401_n.jpg

(heres the list of plug-in i put so far until i get the skill working)
25276544_152423255398241_51113713_n.jpg


Youtube video of the skill:
the place to get the skill code: http://yanfly.moe/2017/01/09/tips-tricks-death-final-fantasy-11-rpg-maker-mv/
Your plugins are out of order.
Place Battle AI Core after TurnOrderDisplay. Then BuffStatesCore, Then StateCategories, then SkillCore. Place ExtraParamFormula directly below CoreEngine. Aka, sort it according to this list: http://yanfly.moe/yep/

Check if it will work after that.
now its finding this as an error.
25323706_152578245382742_1147927959_n.jpg

idk if i should just abandon the skill if i can't find a way to fix it. i already got the Doom countdown work at least
25323921_152578558716044_1625477358_n.jpg


the 'Death' skill:
// Display cost
<Custom Cost Display>
\fs[20]\c[23]All MP\c[0]\fr
</Custom Cost Display>

// Requires user to have at least 1 MP
<Custom Requirement>
value = user.mp > 0;
</Custom Requirement>

<Pre-Damage Eval>
// Check if the target isn't a boss
if (!target.isStateCategoryAffected('boss')) {
// Set the damage to 0
value = 0;
// Remove the HP popups
target.result().hpAffected = false;
}
</Pre-Damage Eval>

<Post-Damage Eval>
// Check if the target isn't a boss
if (!target.isStateCategoryAffected('boss')) {
// Remove the HP popups
target.result().hpAffected = false;
// Get the target's death state ID
var deathStateId = target.deathStateId();
// Calculate the chance based on the user's current MP%
var chance = user.mpRate();
// Alter that based on the target's death resistance
chance *= target.stateRate(deathStateId);
// Check RNG if it passed
if (Math.random() < chance) {
// Check if the target is temporarily immortal from action sequences
if (target.isImmortal()) {
// If it is, remove the temporary immortal status
target.removeImmortal();
}
// Add the death state
target.addState(deathStateId);
} else {
// Display a miss if RNG failed
target.result().missed = true;
}
}
</Post-Damage Eval>

<After Eval>
// Set user's MP to 0
user.setMp(0);
<After Eval>

Edit: it seems the issue is setting a enemy hp to 999999 what may have caused the issue, so am not so sure why a error would pop up like that. now its getting a boss to take damage instead of getting killed by the skill

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-death-skill.88368/