using eval to sync actor levels

Ok so i'm trying to figure out how to sync the levels of 2 actors during a summon skill.  I'm using this skill by Ramza. But I didn't think to include syncing the actor levels in my request.


So I try to figure it out on my own which got me this:


eval: $gameVariables.setValue(20 , $gameParty.allMembers().forEach(function(entry){ if(entry._actorId==3) actor1Lvl=entry._level;});


eval: $gameActors.actor(17).changeLevel($gameVariables.value(20), false);


But when i test it it tells me "unknown token ;"


Can someone help? is it even possible?
What is actor1Lvl?  You've got to use existing properties - can't just make them up.


Can you explain what you want to achieve?  What is "syncing" in this context?  You want to set actor 17's level to be the same as actor 3's?  Is it always just those two actors and in that order?  How do you know what actor you want to change, and what level you want to base it on?  You're potentially going to make one actor lose skills they had recently acquired, if you drop them to a lower level?


To change actor 17's level to the same as actor 3's, the command would be:


$gameActors.actor(17).changeLevel($gameActors.actor(3).level(), false)


but if the actor whose level you want to change, and the actor you want to use as the base, will be different each time, you won't want to hardcode those numbers.
Of course I can explain. Lets say Actor 1 (Barry) uses a summon skill (in the skill it defines which actor and temporarily adds them to the team that part is fine) to summon Actor 2 (Bunny). Bunny like any actor has a class and with that has certain skills that are only available at specific levels. Bunny's level is set to 1 in the database. Barry is a normal character in the game and levels up so i want the summoned actor level up as well. Does that explain what i'm trying to do well enough?


That command should definitely do what i'm looking to do so many thanks


Im using this skill in case you want to see it: http://forums.rpgmakerweb.com/index.php?/topic/66222-ramzas-state-workshop-current-states-8-latest-enflame/&do=findComment&comment=651955
If the actors involved are always going to be the same ones, or if you have created different skills for each actor pair, the above should work okay.  But if the one skill could be used by different actors, to summon different actors, you'd need a way to be able to use variables instead of hardcoding the actor ids.  The first one could just be the skill's user, if several people can use the same skill to summon the same actor.
I only have one character using the summon skill so this should be fine but when i tested it just now it told me "TypeError number is not a function"
sorry.  Get rid of the () after level

Code:
$gameActors.actor(17).changeLevel($gameActors.actor(3).level, false)

Original thread: https://forums.rpgmakerweb.com/threads/using-eval-to-sync-actor-levels.71047/