OBJECT_SCHEMA_NAME function was newly introduced in SQL Server 2005 SP2. If you have not applied SP2 you will have "OBJECT_SCHEMA_NAME is not a recognized built-in function name" error.
Download and Install SP2 to solve this problem.
I am an Ex-Sailor from Indian Navy who possesses rich experience in Microsoft SQL Server. I would take this opportunity to pay tribute to all those who serve their country with pride, always keeping “Service before Self”.