<?php
if (empty($scriptProperties['id'])) return $modx->error->failure($modx->lexicon('trosk.parametar_err_ns'));
$param = $modx->getObject('params',$scriptProperties['id']);
if (empty($param)) return $modx->error->failure($modx->lexicon('trosk.param_err_nf'));
 
if ($param->remove() == false) {
    return $modx->error->failure($modx->lexicon('trosk.parametar_err_remove'));
}
 
return $modx->error->success('',$param);