seems like AnimDirection() is a function, so it should not be in quotes.
AnimDirection()
Make sure to paste your code with proper formatting