Every single thing I've tried so far has turned up an error, or said functions that I used in other scripts weren't, in fact, functions. I just want to run a for loop for every actor, then check the actor name against the current event name (stored in the variable at #10).
Code:
for (let i = 1; i < $gameActors._data.length; i++) {
if ($gameActors._data[i] && $gameActors._data[i].name() == $gameVariables.value(10)){
$gameVariables.setValue(11, actor.actorId())};