I can't reproduce that error from the information given as it shouldn't matter that direction was already a global and you should get an error if you try to redeclare it as a local. It should also work whether direction was declared as a default, String or Number type. So I'm wondering what the real reason for that error is
