Skip to Content

Error messages

Error messages the API raises, grouped by area, and the conditions that are reported without raising.


Errors a binding raises, by area. A C function's argument error reads bad argument #N to '<function>' (<message>); the others read as shown. Values returned as nil, reason are listed with each function.

AreaRaised message
Runtimejit.util is not available to scripts; a removed global gets the line '<name>' was removed from the Lua API; use <replacement> instead; a non-string error value becomes (error object is a <type> value).
Argumentsstack index N, expected <type>, received <type>…; sol: no matching function call takes this number of arguments and the specified types; expected vector, vector* or {x, y, z} and its vector2d / vector4d / angle / color forms (vector, vector* or {x, y, z} expected from C functions).
Value types'angle' has no member named '<key>'.
timer, notifyexpected a finite, non-negative number of seconds; expected a finite, positive number of seconds.
globalsglobals.<key> is read-only.
consoleinteger, int64_t or uint64_t expected; non-negative integer, int64_t or uint64_t expected; unsupported variable type.
memorymodule needs to be a string; interface needs to be a string; index needs to be a number; signature needs to be a string; invalid interface; invalid C type; invalid signature; attempt to dereference a null pointer.
panoramapanorama.object: unsupported argument.
renderthickness must be a finite number; radius must be a finite number; expected a table of vector2d; setup_texture_rgba: size must be whole numbers from 1 to 16384; setup_texture_rgba: the table must hold exactly w * h pixels; load_font: size must be a number from 1 to 256; expected font_t or nil.
particlesexpected a particles.PATTACH_* value; expected base_entity_t or nil; PATTACH_WORLDORIGIN does not attach to an entity; use PATTACH_CUSTOMORIGIN_FOLLOW or PATTACH_ABSORIGIN_FOLLOW, or pass nil; expected a non-negative control point index.
cameraangles must be finite.
Objectsarray index out of range; gameevent used after its callback returned; view_setup used after its override_view call returned; view_setup: unknown field '<name>'; expected user_cmd_t; expected a button mask (number or uint64).
ESP and style ctxesp ctx is read-only; style ctx is read-only; esp ctx used outside its render call; style ctx used outside its draw call; ctx:<method> is an ESP element's, not a style's; ctx:<method> is a style's, not an ESP element's; ctx:builtin is proximity_warning's; expected texture_t; a host texture draws only in the call that handed it.
uiexpected ui object; ui node was removed; ui: id '<id>' already names a control of another type; ui: a built-in menu node cannot be changed or removed; use ui.find_object for its values; expected 'toggle' or 'hold'; list items must be strings; a multi-select holds 64 items at most; expected a mask: a whole number, int64_t or uint64_t; expected 'left', 'right', 'full' or a ui side number; set_visible: this node cannot be hidden; visible_if: this node cannot be hidden.
MCP lua_evaleval budget of N ms exhausted.

Reported, not raised (the call goes on; the Scripts tab, console and MCP show it once per load): more than 4096 draw commands or 64 KiB of text in one call; the rest of the call was dropped, a window style must return its size: w, h above 0, or false to draw nothing and the frame's drawing budget for styles is spent; built-in look this frame.