Skill usage help

Hi all, apologies if this has been asked before, I'm somewhat novice with variables and battle events!

The goal:
To have a character learn an ability when X Variable has been met.
The ability inflicts a State and I want the State to add 1 to the Variable.
Its kind of a "use this ability to learn a new double damage ability against that enemy type".
It's sort of supposed to be like FfX's Kimahri when he uses Lancet to learn Blue Magic, except the number of uses needs to be more than 1.

I had this working fine on Rm2003 but for some reason I can't get it to work on RM MV on PS4.

Original thread: https://forums.rpgmakerweb.com/threads/skill-usage-help.129635/