This question has been answered by tothconnor. See the first response.
Are you running the snippet outside of MODX somehow?
If so, see this: http://bobsguides.com/blog.html/2013/07/13/using-modx-outside-of-modx/.
If you're in MODX (iow, the snippet tag is in a resource or chunk), you'll have to post the code of the snippet with the ID of 1 before we can help you.