You need to create the variable, its just an example, er, in my example
In the script window where you typed the code youll notice a 'Variables' button, click it, then click 'Add'. All you need to do there is enter the name of the new variable at the top and click the 'add' button at the bottom. You'll need to do alot of that if you'll be doing much scripting.
Also, make sure that in the global code you cave the following two lines of code as they will allow you to use TRUE and FALSE in your scripts:
const FALSE = 0;
const TRUE = -1;
It's worth sticking with it mind, it can be a bit daugnting at first but youll soon get the hang of it
If you load up the demo levels and look at them carefully you'll get a good idea how things are put together, but I realise its not always obvious so dont worry about asking!