Call as
Platform.glyphs.integer(value, minimum)
Record the dependency Platform.glyphs.integer, 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
Returns true when value is a finite whole number no smaller than minimum, and false for anything else (including NaN and infinity).
Arguments
| Name | Type | What it does |
|---|---|---|
value | any | Value to test. |
minimum | number | Smallest accepted value. |
Returns
| 1 | boolean | True when value is an integer of at least minimum. |
|---|
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
Platform.glyphs.GetGlyphItemInfoif not integer(itemID,1) then return nil,'invalid-item' endPlatform.glyphs.GetGlyphSocketSnapshotif not integer(count,0) or count>64 then return nil,'invalid-api-result' endPlatform.glyphs.socketif not integer(kind,1) or enabled~=nil and type(enabled)~='boolean' then return {slot=index,reason='invalid-api-result'} end
Source
Platform/glyphs.lua, line 16. Read only in game; Duplicate makes an editable copy.
Platform.glyphs.integer(value, minimum)
return type(value)=='number' and value==value and value>=minimum and value<math.huge and value%1==0