Reference › Function reference › utils

utils.packResults

dependency

Call as

utils.packResults(...)

Record the dependency utils.packResults, then call it by that name. A namespaced call does not pass self: use a colon call or pass the object yourself.

What it does

Packaged helper from utils.lua.

Arguments

NameTypeWhat it does
...anyValues to pack, including nils.

Returns

1tableArray of the values with n set to their count, so trailing nils survive unpack(result, 1, result.n).

Editions

Built In helpers are registered on every edition. What differs is the game API they read; where one is missing the helper falls back or returns nil with a reason.

It reads no game API directly.

How the addon calls it

Source

Functions/cache.lua, line 44. Read only in game; Duplicate makes an editable copy.

utils.packResults(...)
    return { n = select('#', ...), ... }

Back to Function reference