ScriptGetNumberField
function · ui · primitive
- Address
0x7036f0· 106 bytes, up to0x703759- Signature
int __fastcall (lua_State *L, const char *name, int default)- Meaning
- Reads a number field of the table at the top as an int, or the default, or raises when the default is -2
- Confidence
- verified, proof two
- Finding
- ui/luabase#time-from-a-table
Finding: Time from a table in ui: the Lua base library
time() returns the current C time. time(t) needs a table with sec and min (default 0), hour (default 12), and
day, month and year (required: field `%s' missing in date table), and reads isdst as a boolean. month is
reduced by 1 and year by 1900, mktime runs on them, and the answer is the number, or nil for −1. Each field is read with lua_gettable (0x6f3a40, so __index is honoured), and a field that is not a number or numeric string (lua_isnumber, 0x70370f) counts as absent; isdst is lua_toboolean, so it is 0 or 1, never −1.
The derivation is in the doc.
Callers 1
- ScriptTime ui
Callees 7
- __ftol crt
- lua_settop lua
- lua_isnumber lua
- lua_tonumber lua
- lua_pushstring lua
- lua_gettable lua
- luaL_error lua
Calls and jumps by a bare address, from tables/calls.tsv.