[Solved]A way to set an enemy Stat as a variable?

Hello! so i'm making a skill similar to Tattle/check from paper mario/undertale and i'm using Yanfly enemy levels. So i'm trying to
make it so that when I use the attack it will get the enemy's stats, and apply them to different variables and then text codes will
be used to show the stats. however, whenever I try out the skill i get an error. If anyone could tell me the correct javascript code it would be great! thanks!

Skill (action sequence and javascript code)
Spoiler
Code:
<Before Eval>
$gameVariables.setValue(6, b.enemyId());
$gameVariables.setValue(12, b.enemyMaxHp());
$gameVariables.setValue(13, b.enemyMmp());
$gameVariables.setValue(14, b.enemyAtk());
$gameVariables.setValue(15, b.enemyDef());
$gameVariables.setValue(16, b.enemyMat());
$gameVariables.setValue(17, b.enemyMdf());
$gameVariables.setValue(18, b.enemyAgi());
$gameVariables.setValue(19, b.enemyLuk());
$gameTemp.reserveCommonEvent(11);
</Before Eval>

<target action>
camera focus: target
zoom: 150%,20
action animation
wait: 60
zoom: 110%, 10
wait: 10
action effect
</target action>

Error
Spoiler
error.PNG

Plugin list
Spoiler
list1.PNG

list2.PNG

list3.PNG

list4.PNG

list5.PNG
Try simply mhp, mmp, atk, def, etc~
Code:
<Before Eval>
$gameVariables.setValue(6, b.enemyId());
$gameVariables.setValue(12, b.mhp);
$gameVariables.setValue(13, b.mmp);
$gameVariables.setValue(14, b.atk);
$gameVariables.setValue(15, b.def);
$gameVariables.setValue(16, b.mat);
$gameVariables.setValue(17, b.mdf);
$gameVariables.setValue(18, b.agi);
$gameVariables.setValue(19, b.luk);
$gameTemp.reserveCommonEvent(11);
</Before Eval>
@caethyril
It worked! Thank you!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/solved-a-way-to-set-an-enemy-stat-as-a-variable.111258/