Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:StatusBarGetMaximumValue

From RoR Wiki
Revision as of 19:49, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · StatusBar functions
Version: WAR 1.4.8

Returns the maximum value of a StatusBar.

maximum = StatusBarGetMaximumValue(barName)

Arguments

barName
string – Name of a StatusBar window.

Returns

maximum
number – The bar's maximum value.

Details

  • The maximum is set with StatusBarSetMaximumValue.
  • The error is the same when the window does not exist and when it is not a StatusBar.
  • The stock UI never calls StatusBarGetMaximumValue.

Errors

  • Error in function call 'StatusBarGetMaximumValue': StatusBar %s does not exist.

Example

A minimal example built from the signature above:

local fraction = StatusBarGetCurrentValue( "MyBar" ) / StatusBarGetMaximumValue( "MyBar" )

See also