MZ Transfer Ability Points to Skill Points

So I'm trying to make a variable js code with Visu Stella Skill Learn Plugin.

$gameVariables.setValue(17, $gameActors.actor(17).getSkillPoints());
$gameVariables.setValue(17, $gameActors.actor(17).loseAbilityPoints());

What I'm trying to do is have Actor Ability Points transfer to Skill Points.
Ex: 100 Ability Points = 1 Skill Point

I've been looking thru the formums and can't get this to work. The code I have only looses all the Ability Points so not sure where I went wrong.

Original thread: https://forums.rpgmakerweb.com/threads/transfer-ability-points-to-skill-points.164958/