Storing actor's name in a variable?

Hello.

I have seen other's asking the same question, in the end nobody says how they did it, they just say "thanks I found it myself"

So what I am trying to do is storing names in variables and calling them for later use. I just want to open up characters input and typing with the keyboard and storing this in a variable.

I found that the only way for that is to open the name processing, name a character and store this name in a variable.

what I do is to use control variables>script> $game_actors[2].name
I tried $game_actors[2].name; as well but it gives me an error everytime

this is the error http://prntscr.com/nskorq
You want to use this : $gameActors.actor(2).name()
You want to use this : $gameActors.actor(2).name()
it works!

I was looking in the script calls list and it was not written this way.

thank again for replying
it works!

I was looking in the script calls list and it was not written this way.

thank again for replying

Well, you might be looking at the Ace script call list because your original code was for Ace, not for MV
it was from this link

https://forums.rpgmakerweb.com/index.php?threads/rpg-maker-mv-script-call-list.46456/
It seems you actually looked at the left hand side descriptions (which somehow contained some Ace scrript calls, they probably forgot to edit when they made the MV list) instead of the actual JS codes in the right hand side of the table.. xD
lol. The one time that I tried to use a script call

Original thread: https://forums.rpgmakerweb.com/threads/storing-actors-name-in-a-variable.109317/