M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
resourceresource|stringThe resource, or its name.
keystringThe 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)

See also