Would be more helpful to understand what the cause of the error is. You should always provide the error message so scripters know where to start looking to debug it.
I'm guessing it has to do with the small text area, forcing you to use two lines. In which case
Because doing something like
$game_actors.level = $game_actors
or similar is syntactically incorrect. Ruby reads and executes each line one at a time; it's not smart enough to know that the  is supposed to be in-front of $game_actors (because the first line is technically valid syntax).