The example is a good one as a stand alone function (not included in another function like 'Wepons or Player and so on..)
Just add it to your main after the 'Main", place "function sniper();" above your main to give the engine the source to look for and call it with its 'if' staement in mind.
on_mouse_right function sniper();
Dont be angry at not being able to make things work right off, game dev is a long agonizing experience for every body and 'learning while doing' seems to be the most common learning style but not the only one, using the manual and scripting guides (all on the download page) is another.
So, just be cool and post each successive prob in a nice way to get more responses, we are not the support arm of conitec, we are all learners like you and we have all been down the same road over and over again.
You should of seen some of my early posts
