Note that the parameters are in wrong order,also in the example at the end of the document.ALL_CHECK is incorrect and won't work properly - but checking the docs you are correct that they are wrong. Sorry about that - fixed now! That would definitely have been confusing.
FUNCTION CHECK_ALL_TURN(me, unit, tilex, tiley)
Should be (I assume because all script checked have that order)
CHECK_ALL_TURN(me, tilex,tiley, unit)

