Conditionally learnable skills

I'm trying to build out a series of  skills for a class where selecting 1 makes another unlearable and i have no idea how to do this.
For example:
Class has skill 1 and skill A available to learn. If i teach the class skill 1, it can no longer learn skill A. If i teach is skill A instead, it can no longer learn skill 1. 
Are you using some kind of script/plugin for this? try checking if the skill id is learned by the actor then do .. etc.
I'm using yanfly's skill lean system plugin. It has a custom requirement note tag option (see below), but i don't know how to set the values. 


<Learn Require Eval>


value = true;


value = false;


</Learn Require Eval>
I think the code looks something like this:


<Learn Require Eval>


if ($gameActors.actorId(n).isLearnedSkill(n)) {


value = false;


} else {


value = true;


}


</Learn Require Eval>


Each n represents the ID of the actor or skill.  I'm hoping that the class is tied to a particular actor and doesn't change who can be that class, because that makes it trickier to code the actor part.
Had to lookup the page for the manual. here it goes. You don't need to use  Lunatic Mode  tags for this.


<Learn Require Skill: x><Learn Require Skill: x, x, x><Learn Require Skill: x to y>
When i put that in it gives me "TypeError, undefined is not a function". I played around with it a little and nothing i tried worked.
Had to lookup the page for the manual. here it goes. You don't need to use  Lunatic Mode  tags for this.


<Learn Require Skill: x><Learn Require Skill: x, x, x><Learn Require Skill: x to y>

That works if i want a skill to require other skills before it can be learned. I'm it using a lot. But what i cant do with that is have a skill become unavailable when a certain skill is learned. 
When i put that in it gives me "TypeError, undefined is not a function". I played around with it a little and nothing i tried worked.

Are you sure you're putting that code in the right spot?  It should go in the skill comment section, not the actor or class.


Some screenshots may help us determine the problem.  The skills involved are likely the key.
I figured it out. I did some digging through the debug tool. The error was $gameActors.actorId(n). I change it to this._actor and it works perfectly. Thank you for the help

Original thread: https://forums.rpgmakerweb.com/threads/conditionally-learnable-skills.63750/