Works here. you've probably pasted it into a single line, or some scripted events above interrupts it...

Try putting it in a new script file, and make sure it's structured exactly as it looks here.