(Solved)Store an actor's attribute in a variable, during a skill.

Hello all, can anyone point me in a direction of either a way to do this, or a plugin that will allow me to do it?
I need to make a skill that will store an actor attribute inside a variable. But not a specific actor, the one who is using this skill, as it's a skill all the actors will have. Short of hard coding a separate version of both the skill and common event for this skill. I'll probably also have to store that actor's ID into a variable as well, for the functionality of the common event to work.
Insert
Code:
$gameVariables.setValue(1, a.atk);
to the very front of the damage formula.
Parameters go like this:
atk
def
mat
mdf
spd
luk
mhp
hp
mmp
mp
tp

Btw. it IS mandatory to end the code I presented with a ";" and it IS mandatory for it to be at the front of the damage formula.
And if the skill has no damage formula, then it's going to be tricky.
Yeah it doesn't have a damage formula, as this isn't meant to be an attack, and even putting one in doesn't seem to be doing the trick.
It's just suppose to kick off a common event, but I need the user's attributes for functionalities in the common event.
Ok, I figured it out. Turns out the mistake I was making was I had to give the skill a target (In this case I choose the user).
For anyone with the same problem I put
$gameVariables.setValue(2, a.atk); 0
In the damage formula, the 2 being the variable I was saving to. Just don't make the same mistake I did, and not give the skill a target.

Original thread: https://forums.rpgmakerweb.com/threads/solved-store-an-actors-attribute-in-a-variable-during-a-skill.105930/