Skill Learn System Item Requirement

Hi guys,

I am using Yanfly's SkillLearnSystem. The basic idea is that you need a scroll in order for the skill to be available. I want to
make it so that skill only shows when the item with the corresponding skill is obtained.

It seems like this section:

<Learn Show Eval>
value = true;
value = false;
</Learn Show Eval>

For using a custom code to hide or show the skill, you can use these
notetags. Returning value as true will cause the skill to appear
regardless of all other requirements being unmet while returning value as
false will cause the skill to appear regardless of all other requirements
being met
.

Should help me get what I want.However, I tried this:

<Learn Show Eval>
var item = $dataItems[n];
if($gameParty.numItems(Scroll of AbilityNo1)>= 1)
){value = true;}
else{
value = false;
}
</Learn Show Eval>

This does not work. I am not very good at scripting at all so chances are my attempt is ridiculous xD.

Can anyone help me?

I've moved this thread to Plug-In Support. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/skill-learn-system-item-requirement.103211/