MZ Audio Sound Effects and Scripting question

Hi, I'm trying to call a sound effect via the script call 'AudioManager.playSe'. The thing is that I want to call the sound effect depending on a variable. The variable is a num type so I use .toString() to change it but the sound effect doesn't play. I've tried at least a 100 times with different variants. This is what the script looks like so far:

$gameVariables.setValue(8, $gameParty.members[1].actorId().toString());
AudioManager.playSe({name: $gameVariables.value(8), volume: 90, pitch: 100, pan: 0});

Basically i get an id from a current party member in battle, turn it to string then set it to a game varabile. Later just use the playSe function. The idea is that each party member plays a different sound (with voice acting?).

Is there a way to make this work, or perhaps using other stuff like plugins?
In order for this to work, your sound effect file name would need to just be the actor's ID number. Is that the case?
That was quick! Yes, thats the idea. Having multiple id's being called by the variable 8. I'm not sure if the id goes 000X or just X, so I'm testing it with both formats just in case. Also I've tried testing a variable set to just 'X' (without extension .oog) and it worked, but still nothing using a numerical variable converted to string. Maybe toString() doesn't work by scripting in the event console?
Oh, I see what you've done wrong. You're missing the () after members.
That did it! I thought it wasn't necessary since the script call list doesn't write () after members.
1623360172231.png

But that begs the question, is it necessary on every non-rpgmakermz function use?
Thanks a lot!
Oh dear, I'd better let Archeia know about that so the script call list can be updated, because it won't work without the brackets.

It's necessary if you're calling a function, yes. The brackets are how you tell Javascript in the first place that you're calling a function rather than accessing a property.
Well, I better start editing all my scripts haha. Thanks again!
Wait, what script call list are you seeing that in? They all have brackets in the Google Docs version.
I'm using the extended one, the Game Data page.
You got a link for that?
https://docs.google. com/spreadsheets/d/1gQNAoYKpkO9Qglgbi8IplX_BPvXmfvG3Rk-R27W30DU/edit#gid=424264704
It got autoembeded erase the space after google.

Original thread: https://forums.rpgmakerweb.com/threads/audio-sound-effects-and-scripting-question.137353/