The problem can be about two things, or the template your using is giving problems, or you'r placing the functions and includes in the wrong way. Solving the template isn't easy, I recomment creating your own script. Anyway where do you have placed the include<flashlight.wdl>;, is it in the first lines of the first script? You could also place the include below the action with "player = me" in it. If this doesn't work, the problem is in the templates.