--- title: nil - Missing values summary: nil represents an absent value. Assigning nil removes a table field. Returning nil and returning no values differ in result count. section: reference kind: guide status: reference updated: 2026-10-26 tags: ["API","X4"] sources: ["https://wiki.egosoft.com/X4%20Foundations%20Wiki/Modding%20Support/","https://www.lua.org/manual/5.1/manual.html","https://luajit.org/ext_ffi_api.html"] --- ## Meaning nil represents an absent value. Assigning nil removes a table field. Returning nil and returning no values differ in result count. ## Example ```lua local function empty() end local function one_nil() return nil end local a = select("#", empty()) -- 0 local b = select("#", one_nil()) -- 1 ``` **What happens:** a = 0, b = 1; no results and one nil have different result counts. This fragment does not print or write a log message. The values shown are the expected results of the example. ## Methods and related calls [API reference](wiki:api-index).