It worked, thank you very much!I fixed the error. Now the script will just skip the offline virtual server.
Download the script again from here https://forum.teaspeak.de/index.php?threads/script-to-automatically-create-snapshots-of-virtual-servers.1537/post-17862