this-> RunScript

(Caronte Pcode version 2.0)

Description

int this->RunScript(string script);

Run the script from the admin folder in the script folder of Caronte (/scripts/admin), and return the value of the return of the script .

RunScript looks for the function "main" in the script, that is the function to be run, this function will not have any parameters, because it's adviced to use persistent objects.

Example.

Source:

CS_ADMIN_SCRIPT this = new CS_ADMIN_SCRIPT($_this);

int Main(CAdminRequest pRequest, CAdminResponse pResponse)
{

this->Print(this->Format("%d",this->RunScript("test.cs")));

return 0;

}


Out:

0