getResourceInfo
Server
Reads an attribute of the <info> tag in a resource's meta.xml, such as author or version.
string|false getResourceInfo(resource|string resource, string key)
Parameters
| Name | Type | Description |
|---|---|---|
| resource | resource|string | The resource, or its name. |
| key | string | The attribute's name. |
Returns
The attribute's value, or false if the resource does not exist or the attribute is missing or empty.
Example
local version = getResourceInfo(getThisResource(), "version") or "unknown"
outputServerLog("running version " .. version)