--- title: table - टेबल और मेथड summary: टेबल में कुंजी-मान जोड़े रहते हैं। अनुक्रम के इंडेक्स सामान्यतः 1 से शुरू होते हैं। object:run(x) का अर्थ object.run(object, x) है: कोलन self भेजता है। टेबल को गेम के मेथड अपने आप नहीं मिलते। 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"] --- ## अर्थ टेबल में कुंजी-मान जोड़े रहते हैं। अनुक्रम के इंडेक्स सामान्यतः 1 से शुरू होते हैं। object:run(x) का अर्थ object.run(object, x) है: कोलन self भेजता है। टेबल को गेम के मेथड अपने आप नहीं मिलते। ## उदाहरण ```lua local object = {count = 0} function object:add(value) self.count = self.count + value end object:add(2) local values = {"a", "b"} local text = table.concat(values, ", ") ``` **क्या होता है:** object.count = 2; पाठ = "a, b"; कोलन वस्तु को स्वयं के रूप में पारित करता है। यह टुकड़ा लॉग संदेश नहीं प्रिंट करता है या नहीं लिखता है। दिखाए गए मान उदाहरण के अपेक्षित परिणाम हैं। ## मेथड और संबंधित कॉल | फ़ंक्शन | लौटाता है | उद्देश्य | | --- | --- | --- | | [table.concat](wiki:api-standard-table-concat-59959ede) | [`string`](wiki:type-string) | एक विभाजक के साथ स्ट्रिंग या संख्यात्मक अनुक्रम तत्वों को जोड़ता है। | | [table.insert](wiki:api-standard-table-insert-fdeedf14) | [`none`](wiki:type-results) | अनुक्रम मान डाले और तत्वों को स्थानांतरित करता है; एक छोड़ दिया गया स्थान इसे जोड़ता है। | | [table.remove](wiki:api-standard-table-remove-f70112c3) | [`any`](wiki:type-results) \| [`nil`](wiki:type-nil) | बाद के मानों को स्थानांतरित करके अनुक्रम तत्व को हटाता है और लौटाता है; डिफ़ॉल्ट रूप से अंतिम तत्व पर। | | [table.sort](wiki:api-standard-table-sort-34b8a577) | [`none`](wiki:type-results) | क्रम को क्रमबद्ध करता है; एक तुलनाकर्ता को एक सख्त क्रम को परिभाषित करना चाहिए। | | [table.unpack](wiki:api-standard-table-unpack-01fac384) | [`any`](wiki:type-results), ... | कई परिणामों में अनुक्रम रेंज का विस्तार करता है; संगतता विस्तार उपलब्ध होने की आवश्यकता होती है। |