AddNumber
This compatibility method behaves like CreateStat. Creates an animated statistic with optional delta and duration. It is kept so scripts written with the older AddNumber name continue to work.
AddNumber
Compatibility alias
AddNumber is an alternate name for CreateStat. New code can use CreateStat.
What it does
This compatibility method behaves like CreateStat. Creates an animated statistic with optional delta and duration. It is kept so scripts written with the older AddNumber name continue to work.
When to use it
Use it for a single KPI that may change and should emphasize the new value. Prefer CreateStat in new code so the method name matches the current API.
ElementFunction:AddNumber(StatConfig)
local Result = Section:AddNumber({
Name = "Example",
Callback = function(value)
print(value)
end,
})Behavior and return value
This alias forwards to CreateStat, so its options, callbacks, and returned value follow the canonical method.
Fields marked optional may be omitted. XLQP then uses the method’s built-in default or leaves that feature disabled.
Related reference
AddMusicDisc
This compatibility method behaves like AddDiscPlayer. Adds a disc-style audio player connected to a playlist or media controller. It is kept so scripts written with the older AddMusicDisc name continue to work.
AddNumberCard
This compatibility method behaves like AddRevenueCard. Adds an animated metric card with trends, prefixes, suffixes, and supporting mini-statistics. It is kept so scripts written with the older AddNumberCard name continue to work.