How to call yanfly job point value in a conditional branch?

So i have a crystal that when you interact with it, it will give you a skill and subtract a job point. My problem is if you have 0 job points it still goes through the text. How would i go about having a conditional branch that checks if you have enough job points, else it says you dont have enough job points.

Thanks!
Set the conditional branch to 'Script' and paste the following code
$gameActors.actor(id).jp() > 0

Replace id with the numerical id of the actor being dealt with
Gain Skill
Subtract jp

Set the else condition to tell you that you don't have enough.
Set the conditional branch to 'Script' and paste the following code
$gameActors.actor(id).jp() > 0

Replace id with the numerical id of the actor being dealt with
Gain Skill
Subtract jp

Set the else condition to tell you that you don't have enough.

Thanks so much!
Of course, happy to help. Let me know if it throws any errors on your end.
Of course, happy to help. Let me know if it throws any errors on your end.

Nope, worked perfectly!

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/how-to-call-yanfly-job-point-value-in-a-conditional-branch.111148/