Basic tutorial 12
Comment lines.
When you start writing big scripts, you want to make sure you still understand everything when you read it later on. You can add clarity to your scripts by adding comments to it. All comments should be preceded by 2 forward slashes(//). Then everything that follows it on the same line is ignored and thus not seen as a command.
In tutorial 8 we discussed toggles. At the end there was an example script with a sensitivity toggle. Now let's use that example to show you can add comment lines to it:
//Binded key
bind x "vstr sens"
//Toggle
set sens1 "sensitivity 1; set sens vstr sens2"
set sens2 "sensitivity 1.5; set sens vstr sens3"
set sens2 "sensitivity 2; set sens vstr sens1"
//Initial value
set sens "vstr sens1"
That's all there is to it.
|