MV (Yanfly's Self Switches and Variables) Turning off a range of self switches in one script call

For this plugin, the script call for turning off a self switch is:

Code:
this.setSelfSwitchValue(mapId, eventId, switchId, false)

I was wondering if there is a way to turn off a whole range of switches (like 201-215) in a single script call, like you can with normal switches.

Thanks!
JavaScript:
for (let x = 201; x <= 215; x++) {
    this.setSelfSwitchValue(mapId, eventId, x, false);
}
@Arthran Thanks for that, but for some reason it's not working. It's behaving exactly like if there were no script call at all.

I looked up "for" and "let", and it seems like it should work. I'll mess around with it some more and see if I can figure out what the problem is.
Hmmm... Can you show me exactly what you typed?
I tried a few things, the simplest thing I tried was to turn off self switches 247 and 248 for event 199 (the event that ran the script call is on the same map as event 199):


Code:
for (let x = 247; x <= 248; x++) {
    this.setSelfSwitchValue(this._mapId, 199, x, false);
@HankB
your code here is missing the }
is that also missing in your event?

generally it is better to make a screenshot of the event than to retype here what you think to have written, exactly because typos happen all times.
@Andar I copy/pasted the code directly from the event, so it's the same, but I see now the missing bracket, dumb mistake on my part, it's working now. Thanks for pointing that out.

Original thread: https://forums.rpgmakerweb.com/threads/yanflys-self-switches-and-variables-turning-off-a-range-of-self-switches-in-one-script-call.147805/