DeleteResource: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
OpenIDUser32 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
{{New feature|3.0120|1.2| | {{New feature/item|3.0120|1.2|3316| | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} |
Revision as of 06:53, 21 November 2011
This function deletes a resource.
Syntax
bool deleteResource ( string resourceName )
Required Arguments
- resourceName: The name of resource to delete.
Returns
Returns true if the resource has been deleted successfully, false otherwise.
Example
This example checks to see if there's 2 resources.
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function() resources = getResources() --Get all resources if (getResourceState(resources) == "loaded" and "running" or "loaded" and "starting") then --Checks to see if there's to resources that's loaded and running or loaded and starting up stopResource(resources) deleteResource(resources) end end)
Requirements
This template will be deleted.
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo