Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:GetPlayerEnergy

From RoR Wiki

UI Lua API · Game functions
Version: WAR 1.4.8

Looks up a named value and returns it as a number.

value = GetPlayerEnergy(name)

Arguments

name
wstring – Name to look up. It must be a wide string.

Returns

value
number – The value stored under that name, or 0 if the name is not found.

Details

  • The name is converted to a plain string (at most 99 characters) and looked up in a table of named entries held by the client. If an entry is found, its stored value is returned; otherwise the result is 0.
  • Passing a plain Lua string raises an Invalid Parameters error.
  • The stock UI never calls this function, and what the names refer to has not been confirmed. Treat the function as undocumented.

Errors

None.

Example

A minimal example built from the signature:

local value = GetPlayerEnergy( L"SomeName" )

See also