Scripts can include various commands, and most of them are “safe”, and they can be placed in the restricted scripts folder. However, some scripts will include commands like “closing a file” or “saving a file”. Just to make sure those commands do not damage images or your computer (worst case scenario) you have to trust those scripts, and that is why they have their separate folder.
Usually, if a script needs to be placed in the Trusted folder and it is not, you will get an error message just like you mentioned. If you place the script in the Trusted scripts folder and you are still getting the same error, it is usually because there is already a copy of the script somewhere, in a Restricted scripts folder. PSP will read that folder FIRST and if it finds the scrip you are trying to run, it won’t check in the Trusted folder. SOLUTION: check all your Restricted scripts folder and delete the specific from there. If you can seem to find it, you can get around by renaming the script with a number or other, so that you would be sure there is no other copy anywhere else.
For more information about troubleshooting, check out this article:
https://scrapbookcampus.com/2015/01/my-script-failed-troubleshooting-guide/
Hope this helps.