I can't lock the second character in Yanfly's party system.

First, I can lock the leader (first slot character), and I need to lock the second character too, so I used Yanfly.

In the row 389, I change it to "def lock_actor(2)" but when enter game, it have an error "unexpected tINTEGER"

Then I undo it and tried to row 51 and change like that, the game can open but the second character isn't locking.

Well, so my question is : What do I need to do to lock the second character in Yanfly ?
First, only ever change the actual script if you are an experienced user.  Have you returned line #389 to its original?

Next, there is a bug in this script.  Lines #392 and #402 should read like this:

return unless $game_party.battle_members.include?(actor)

Notice, the change is in the (actor) part at the end of the line.

Line #51 changes nothing.  It is part of the description, not part of the script.  It is telling you what to put into the event which locks the actor.  Change it back to its original, so that you remember what it is.

So in your game, at the appropriate moment, when you have actor 2 in the formation position that you want (e.g. when you add him/her to the party) you make a script call 

lock_actor(2)

There is something which may be of help to you.  I'll have to go and look for the link.

EDIT

Here it is.  Read through it to see what Andar says about using scripts.

Original thread: https://forums.rpgmakerweb.com/threads/i-cant-lock-the-second-character-in-yanflys-party-system.41702/