getResourceInfo
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function retrieves the value of any attribute in a resource info tag.
OOP Syntax Help! I don't understand this!
- Method: resource:getInfo(...)
Syntax
string getResourceInfo ( resource theResource, string attribute )Required Arguments
- theResource: the resource we are getting the info from.
- attribute: the name of the attribute we want info about.
Returns
- string: value
Returns a string with the attribute value if it exists, false otherwise.
Code Examples
shared
This function tells the server who's the author who made the currently running resource.
function outputAuthor() author = getResourceInfo ( getThisResource(), "author" ) --Get the authors name if author then --if it exists outputChatBox( author .. " made this script." ) --tell the world his name else --if it doesn't outputChatBox( "I've no idea who made this script." ) --apologize. endendSee Also
Resource Functions
- abortRemoteRequest
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getRemoteRequestInfo
- getRemoteRequests
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceGUIElement
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResources
- getResourceState
- getThisResource
- isResourceArchived
- isResourceProtected
- refreshResources
- removeResourceFile
- renameResource
- restartResource
- setResourceInfo
- startResource
- stopResource
- updateResourceACLRequest