Script Call Self-Switch

Hi Guys and Gals,

I tried experimenting with script calling self-switches in Set Movement Route. I want to flick a self-switch when the player pushed something so that it changes it's state (sheet). In this case I do not need to do it in Set Movement Route but in other cases I may need to do it in it to use the (Skip if cannot move) function.

◆If:Player is facing Up
◆Set Movement Route:This Event (Skip)
: :◇Jump:+0, -1
: :◇Script:$gameSelfSwitches.SetValue([9, 1, A], true);
◆
:End

◆If:Player is facing Up
◆Set Movement Route:This Event (Skip)
: :◇Jump:+0, -1
: :◇Script:var key = [9, 1, A]
: :◇Script:$gameSelfSwitches.setValue(key, true);
◆
:End


This is the error I get for the first two:
upload_2018-7-8_1-15-20.png


And then I experimented with:
◆If:Player is facing Up
◆Set Movement Route:This Event (Skip)
: :◇Jump:+0, -1
: :◇Script:var key = [9, 1, A] $gameSelfSwitches.setValue(key, true);
◆
:End


Unexpected Identifier is what it gives me as an error

When I try these first ones the event at least jumps. When I try the next one I still get that A is undefined but it does not even jump before it returns the error:
◆If:Player is facing Up
◆Set Movement Route:This Event (Skip)
: :◇Jump:+0, -1
◆Script:var key = [9, 1, A]
: :$gameSelfSwitches.setValue(key, true);
◆
:End
Firstly, it's because the var key = [9, 1, A] is in different script panel with the main script. So I suggest you to input the value directly to the main script call. Your second try, when you tried putting it together, give different error because there's no semicolon (;) to separate the line code.
Secondly, CMIIW but I believe it's supposed to be "A" with quote. Not just A.

It should look like this : $gameSelfSwitches.setValue([9, 1, "A"], true);
I tried that one as well Kuro and it did not work for me the first time. Is it possible that it is because I accidently used the quotation mark in my language (Bulgarian). Is it possible that they are considered different signs?
Whatever, now it worked. I consider this one to be solved and I will ask for the thread to be closed in two hours to give you time to respond about the quotes if you know.
Thread closed IgnoreMe

Original thread: https://forums.rpgmakerweb.com/threads/script-call-self-switch.97407/