Perhaps you have not added the Ping() UDF to your script?

The various ping UDFs are user contributed functions and are not part of the base KiXtart interpteter. You need to include them in your script by copy-and-paste, or by storing them in an additional file and using CALL to read them in.

You can find the UDFs in the link that Witto has posted.