Hard time with script calling variables, syntax?

Hi all, I'm a novice when it comes to scripting and I'm currently struggling through something simple.
I'm trying to create an event that unlearns every single skill through a call loop related to a variable, I found this method through an MV forum. Obviously the syntax is different for Ace, and I can't figure this out for the life of me...

Example for MV:

Variable X = 0. Loop is started:
Add 1 to X
Script call: "$gameActors.actor(actorId).forgetSkill($gameVariables.value(X));"
If X >= (your last skill ID) then break loop


This is the script call I have currently when trying to translate to Ace (this crashes the game):

$game_actors[001].forget_skill($game_variables[$game_variables.value[0005]])


Can anyone help me create the proper syntax for Ace that won't crash my project? Thanks in advance!
Try $game_actors[1].forget_skill($game_variables[5])
I think the numbers in [ ] brackets shouldn't have the zeroes (so $game_actors[1], for example). I'm not sure what you want to do with the variables. Do you want the actor to forget skill whose ID is stored in variable 5? Then you would just put $game_variables[5]. So the whole thing would be:

$game_actors[1].forget_skill($game_variables[5])

I highly recommend having a look at this topic if you want to learn some useful script calls. I think there are other script call topics, but this is one I have bookmarked :LZSwink:

Posted at the same time as TheoAllen :LZSlol:
I had a feeling it was much simpler than I was making it out to be... lol. Thank you both very much! Worked like a charm.

Also as an aside @TheoAllen, thank you for the wonderful scripts you've made. I'm using a few of yours in this same (non-commercial) project as well and they're godsends. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/hard-time-with-script-calling-variables-syntax.153943/