SetResourceInfo
Jump to navigation
Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This function sets the value of any attribute in a resource info tag.
Note: that this is protected under ACL ModifyOtherObjects.
Syntax
bool setResourceInfo ( resource theResource, string attribute, string value )
OOP Syntax Help! I don't understand this!
- Method: resource:setInfo(...)
Required Arguments
- theResource: the resource we are setting info to.
- attribute: the name of the attribute that is to be set.
- value: the value of this attribute
Returns
Returns true if the info was successfully set, false otherwise
Example
This function sets the author of the current resource.
function outputAuthor(newAuthorName) 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 setResourceInfo ( getThisResource(), "author", newAuthorName ) outputChatBox( "Author set to: "..newAuthorName ) --tell them that it was set end end
See Also
- addResourceConfig
- addResourceMap
- call
- callRemote
- copyResource
- createResource
- deleteResource
- fetchRemote
- getResourceACLRequests
- getResourceConfig
- getResourceDynamicElementRoot
- getResourceExportedFunctions
- getResourceFromName
- getResourceInfo
- getResourceLastStartTime
- getResourceLoadFailureReason
- getResourceLoadTime
- getResourceMapRootElement
- getResourceName
- getResourceOrganizationalPath
- getResourceRootElement
- getResourceState
- getResources
- getThisResource
- isResourceArchived