GetResourceState: Difference between revisions
Jump to navigation
Jump to search
m (Improved the example) |
No edit summary |
||
Line 1: | Line 1: | ||
{{Server function}} | {{Server client function}} | ||
__NOTOC__ | __NOTOC__ | ||
<!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | <!-- Describe in plain english what this function does. Don't go into details, just give an overview --> | ||
Line 24: | Line 24: | ||
==Example== | ==Example== | ||
<section class=" | <section class="shared" name="Server and client" show="true"> | ||
This example returns the state of a given resource. Syntax: ''/state <Resource Name>'' | This example returns the state of a given resource. Syntax: ''/state <Resource Name>'' | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Revision as of 15:29, 15 May 2014
This function returns the state of a given resource
Syntax
string getResourceState ( resource theResource )
Required Arguments
- theResource: The resource you wish to get the name of.
Returns
If successful returns a string with the resource state in it, false otherwise. The state can be one of:
- loaded
- running
- starting
- stopping
- failed to load - Use getResourceLoadFailureReason to find out why it failed.
Example
See Also
- abortRemoteRequest
- call
- fetchRemote
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceName
- getResourceRootElement
- getResourceState
- getThisResource
- getRemoteRequests
- getRemoteRequestInfo