There is no more code in your script? Then, perhaps the error is in the result returned by the Terminal after a failed execution of “do script”? As long as I know, to execute ok that script, you must have a executable shell script called “pinger_script” within the current directory (if none, my default directory is “~/”).
When executed from a script editor, it returns several empty paragraphs as result. Perhaps an AStudio app receives this as an execution error…