boolean IPS_DeleteScript (int $ScriptID, boolean $DeleteFile)
ID of the script
TRUE if the file should be deleted. FALSE if the file should be moved to the 'deleted' folder.
If the command succeeds, it returns TRUE, otherwise FALSE.
This function removes the script with the ID ScriptID from the internal list of scripts. The script no longer appears in the object tree and cannot be edited.
If the script file is not permanently removed by setting DeleteFile, it is moved to the "/scripts/deleted/" folder.
A script can only be deleted if it has no child objects
IPS_DeleteScript($ScriptID, true); // Delete script including file