Game won't read my script command? Even if it's all wrong, there is no response...

I'm just getting started with scripting. Before now, I've only copy/pasted little bits of code that were proven to work.
But today, I decided that I would attempt my only little tiny script, referencing the RMMZ script call spreadsheet found on this forum. What I'd like to try to accomplish is to change the actor faces during battle so they look... well.. like they're in battle. Then use a common to check when they're not in battle, and switch the face back to whatever their face was before.

Problem is... it doesn't seem to be reading whatever I write into the script box... at all 😳 I wrote, to the best of my knowledge... $gameActors.actor(4).setFaceImage with the filename and index number. Then followed up with $gamePlayer.refresh() and got no response. Not even an error.

So I wrote a call from MV into the script box just to see if I could make it crash (which would let me know if it read it or not): $gameActors.actor(2).startAnimation(25, 0, 0) No response, error, crash, or anything. Before I learned MZ has a different script call format, this code would crash the game as soon as it reached that command in the event.

I'm running the script on a single Troop event for testing, and it's the first command in the event, followed by a few things that grants full TP and a few skills. All of that works. Just not the script. The conditions are Turn: 0 (so as soon as battle begins)
So what does your actual function call for setFaceImage() look like, with everything typed out? Better yet, what does a screenshot of the event look like?
First, let me say it read $gameTemp.requestAnimation([$gameParty.members()[0]], 41 just fine. That was taken from an earlier battle event. But for the sake of testing, I altered it to $gameTemp.SHOWAnimation([$gameParty.members()[0]], 41 expecting it to crash, but it didn't.

Right now, it's witten:

$gameActors.actor(5).setFaceImage(_AshlynFaces1,3)

$gamePlayer.refresh()

And here is how it looks in the event:

s1YGHDo.png
$gameActors.actor(5).setFaceImage(_AshlynFaces1,3)
First of all, this should be
$gameActors.actor(5).setFaceImage("_AshlynFaces1",3)

Second of all, have you tried it in the console window? (Press F12)
changefaceworks.gif
So that worked... but... no one is gonna believe me, but I swear I wrote it out EXACTLY like that last night. That was actually how I wrote it on my very first attempt. After that didn't work, I wrote it without the quotations around _AshlynFaces1. So... last night, hours before I posted this thread, it was:

$gameActors.actor(5).setFaceImage("_AshlynFaces1", 3)

Nothing happened. That's when I started trying other little adjustments, such as removing the quotations. So that's how I ended up with:

$gameActors.actor(5).setFaceImage(_AshlynFaces1,3) that I wrote here last night.

I tried writing it to the console, but it was throwing errors as I wrote it. I'd get as far as:
$gameActors.actor(5).se- And it would start popping up errors. I can't remember anything they were saying, but it certainly wasn't behaving like it is this morning. Today, it's actually helping me out with code suggestions as I write it...

So what gives with this odd behavior? Did the editor just need to be restarted or something? And why didn't the game crash when I deliberately wrote a script in 'MV style' like it did a couple months ago when I first attempted scripting?
And why didn't the game crash when I deliberately wrote a script in 'MV style' like it did a couple months ago when I first attempted scripting?
It depends on the code whether something crashes or not. If the continuing operation of the game depends on the function running properly, it'll crash (if you're setting a variable to the return value of a function, then using that variable more, that function not being correct and setting a null value will crash).

But if you're just telling to the game to do something and nothing else references it (e.g. change the face portrait) and you pass an incorrect data type into the method, that should either produce an error in the console or nothing at all (I find JavaScript's error reporting to be very lax for my preferences).
That makes sense. But still, the game used to crash when I wrote MV style (is syntax the right word? lol) code to try to play a healing animation on a battler. That's what has me most confused. That and the fact that it wasn't executing the code when written properly. I'm convince the editor just needed a restart 😳

Original thread: https://forums.rpgmakerweb.com/threads/game-wont-read-my-script-command-even-if-its-all-wrong-there-is-no-response.145507/