util.resource.current

Shared

Returns the name of the resource the calling script belongs to


Syntax

local result = util.resource.current()

Parameters

No parameters are accepted by this function

Returns

TypeNameDescription
string | boolresultName of the calling resource, false otherwise

Examples

Get the current resource name
core.engine.print("info", "Running resource:", util.resource.current())

On this page