If you want to store something in your variable 9 and you ask how to save something in a variable using a script call I can answer you this:
Code:
$game_variables[your_variable_id] = something
If you add that to a script call you'll find that it DOES NOT work. It does not work because it is meant to be generic. Your game has no idea of what "your_variable_id" is. That is supposed to be your variable ID that only you know.
To have the code working you have to change your_variable_id with 9. If you do that in your game it will look like this:
Code:
$game_variables[9] = something
Now, it still won't work because there is no such a thing as "something" in your game, but if you change that "something" to be a number, a string, a character or anything that does actually exist then it will have some effect. You can give it a try if you want. Just put a number or a string instead of it and then display your variable in a message. You'll see how your variable value changes depending on what you write there.
That is exactly what I meant. We can provide you the code but you have to know how to edit it to fit your project.
In any case you will often find instructions in the code itself after a "#". That is because everything after a "#" in a ruby line is a comment and does not work as executable code so programmers use them to write instruction and other useful informations inside the code itself.