- Dokumentacja
- Funkcje serwera
- getResourceInfo
Funkcja
getResourceInfo
Zwraca wartość atrybutu z <info> w meta.xml zasobu, np. name, author, version, type, description.
Składnia
string getResourceInfo(resource theResource, string attribute)Argumenty
theResourceresource- Zasób.
attributestring- Nazwa atrybutu.
Zwraca
Wartość albo false.
Przykład
local res = getThisResource()
outputServerLog(("%s %s, autor: %s"):format(getResourceName(res), getResourceInfo(res, "version") or "?", getResourceInfo(res, "author") or "?"))