# \#lua

**URL:** https://forum.heroiclabs.com/tag/lua/30.md

[Latest](https://forum.heroiclabs.com/latest.md) · [Categories](https://forum.heroiclabs.com/categories.md) · [Tags](https://forum.heroiclabs.com/tags.md)

---

## [Offline Gameplay + Server Authoritative Multiplayer](https://forum.heroiclabs.com/t/offline-gameplay-server-authoritative-multiplayer/6464)

<div class="topic-metadata">

**Author:** [@Firebugs](https://forum.heroiclabs.com/u/Firebugs)\
**Replies:** 3\
**Last updated:** [November 28, 2025, 2:03pm UTC](https://forum.heroiclabs.com/t/offline-gameplay-server-authoritative-multiplayer/6464 "2025-11-28T14:03:00Z")

</div>

Hey all, I couldn’t seem to find an answer to this via googling (which really surprised me since I’m sure this must have been asked / covered before). I’m currently making my first networked game (Unity front-end, Nakam…

---

## [Shared Lua Modules](https://forum.heroiclabs.com/t/shared-lua-modules/6407)

<div class="topic-metadata">

**Author:** [@Eatos](https://forum.heroiclabs.com/u/Eatos)\
**Replies:** 0\
**Last updated:** [September 20, 2025, 12:07am UTC](https://forum.heroiclabs.com/t/shared-lua-modules/6407 "2025-09-20T00:07:34Z")

</div>

Is it possible to have a shared modules per matches. Like you can have “static” data that doesn’t change per match, or code that is purely statles, but organised in modules so well can be easy mainteded? Right now in Na…

---

## [Lua Runtime Multi Update Example Error](https://forum.heroiclabs.com/t/lua-runtime-multi-update-example-error/6391)

<div class="topic-metadata">

**Author:** [@SirCez](https://forum.heroiclabs.com/u/SirCez)\
**Replies:** 1\
**Last updated:** [September 3, 2025, 9:52am UTC](https://forum.heroiclabs.com/t/lua-runtime-multi-update-example-error/6391 "2025-09-03T09:52:11Z")

</div>

Hi, just a heads up. The example given in the documentation doesn’t work. @seesee Function Reference - Heroic Labs Documentation local account\_updates = {} -- table of account update objects local storage\_writes = {} -…

---

## [Nk.register\_rpc in lua does not accept PUT requests and returns an error {"code":12,"message":"Method Not Allowed"} is there a way to make the server accept PUT requests?](https://forum.heroiclabs.com/t/nk-register-rpc-in-lua-does-not-accept-put-requests-and-returns-an-error-code-12-message-method-not-allowed-is-there-a-way-to-make-the-server-accept-put-requests/6349)

<div class="topic-metadata">

**Author:** [@gamemania1000000](https://forum.heroiclabs.com/u/gamemania1000000)\
**Replies:** 3\
**Last updated:** [July 29, 2025, 5:27pm UTC](https://forum.heroiclabs.com/t/nk-register-rpc-in-lua-does-not-accept-put-requests-and-returns-an-error-code-12-message-method-not-allowed-is-there-a-way-to-make-the-server-accept-put-requests/6349 "2025-07-29T17:27:55Z")

</div>

Hello! I am implementing a shopping cart system which consists of two steps: 1) Create a payment by sending a POST request to the Nakama server. 2) Complete the payment by sending a PUT request. I have a problem: I found…

---

## [Basic authoritative server test](https://forum.heroiclabs.com/t/basic-authoritative-server-test/6267)

<div class="topic-metadata">

**Author:** [@JasonE](https://forum.heroiclabs.com/u/JasonE)\
**Replies:** 2\
**Last updated:** [June 23, 2025, 6:37pm UTC](https://forum.heroiclabs.com/t/basic-authoritative-server-test/6267 "2025-06-23T18:37:53Z")

</div>

I have been stuck and I have used even AI to try and figure out what is wrong. so I will paste alot of data and hopefully someone can explain or tell me what is wrong while trying to “register authoritive matches” first…

---

## [Password hashing possibility in Go runtime module](https://forum.heroiclabs.com/t/password-hashing-possibility-in-go-runtime-module/6081)

<div class="topic-metadata">

**Author:** [@Norvaisas](https://forum.heroiclabs.com/u/Norvaisas)\
**Replies:** 3\
**Last updated:** [March 14, 2025, 5:57pm UTC](https://forum.heroiclabs.com/t/password-hashing-possibility-in-go-runtime-module/6081 "2025-03-14T17:57:30Z")

</div>

Hello all, I have a question - I’ve been working on my game which will have a standalone sign-up/login on the Godot side and have been thinking of how I could implement forgot-password functionality without giving out th…

---

## [Listing Stream Presences](https://forum.heroiclabs.com/t/listing-stream-presences/5920)

<div class="topic-metadata">

**Author:** [@SirCez](https://forum.heroiclabs.com/u/SirCez)\
**Replies:** 2\
**Last updated:** [January 14, 2025, 1:06pm UTC](https://forum.heroiclabs.com/t/listing-stream-presences/5920 "2025-01-14T13:06:34Z")

</div>

Reading the documentation and running the following code returns an empty table (no presences). The below code is ran in an RPC function through the console API explorer page (acting as the system user). Before invoking…

---

## [Nakama Lua Intellisense Implementation](https://forum.heroiclabs.com/t/nakama-lua-intellisense-implementation/2576)

<div class="topic-metadata">

**Author:** [@KittySkin](https://forum.heroiclabs.com/u/KittySkin)\
**Replies:** 7\
**Last updated:** [January 14, 2025, 5:21am UTC](https://forum.heroiclabs.com/t/nakama-lua-intellisense-implementation/2576 "2025-01-14T05:21:53Z")

</div>

Hello! This is a bit of a repost, but since I didn’t create the original topic related to the Intellisense Implementation for Lua, I decided to do this and make it better sorted and easier to read. Without further ado, …

---

## [Getting no results from leaderboard\_records\_list function in RPC (Lua)](https://forum.heroiclabs.com/t/getting-no-results-from-leaderboard-records-list-function-in-rpc-lua/5913)

<div class="topic-metadata">

**Author:** [@alihanifi](https://forum.heroiclabs.com/u/alihanifi)\
**Replies:** 3\
**Last updated:** [January 6, 2025, 4:52pm UTC](https://forum.heroiclabs.com/t/getting-no-results-from-leaderboard-records-list-function-in-rpc-lua/5913 "2025-01-06T16:52:42Z")

</div>

Hi, I am trying to write a custom RPC to get the leaderboard data, but I have encountered a weird behaviour. This is the code I have wrote to debug the leaderboard records to see if there are any records available: loc…

---

## [Lua VM Modules](https://forum.heroiclabs.com/t/lua-vm-modules/5737)

<div class="topic-metadata">

**Author:** [@Eatos](https://forum.heroiclabs.com/u/Eatos)\
**Replies:** 15\
**Last updated:** [November 14, 2024, 11:06am UTC](https://forum.heroiclabs.com/t/lua-vm-modules/5737 "2024-11-14T11:06:15Z")

</div>

Hello everyone, Recently as we are nearing some bigger testing and things, we have noticed one issue or well huge issue i would say how lua runtime works, so wanted to confirm here. So we tried to stress test game whic…

---

## [Unity Authoritative matches via lua server](https://forum.heroiclabs.com/t/unity-authoritative-matches-via-lua-server/5701)

<div class="topic-metadata">

**Author:** [@Mahmoud](https://forum.heroiclabs.com/u/Mahmoud)\
**Replies:** 1\
**Last updated:** [October 22, 2024, 1:35pm UTC](https://forum.heroiclabs.com/t/unity-authoritative-matches-via-lua-server/5701 "2024-10-22T13:35:24Z")

</div>

Hi Everyone! I am trying to write a Lua dedicated server in which players register their name and cards deck id and try to start the match passing these data aside with a random seed and a Boolean to determine which pla…

---

## [Notifications List by UserId](https://forum.heroiclabs.com/t/notifications-list-by-userid/5589)

<div class="topic-metadata">

**Author:** [@yusuf](https://forum.heroiclabs.com/u/yusuf)\
**Replies:** 0\
**Last updated:** [August 29, 2024, 1:16pm UTC](https://forum.heroiclabs.com/t/notifications-list-by-userid/5589 "2024-08-29T13:16:41Z")

</div>

I’m sharing the notification listing function for Lua on the server. Versions: Nakama {3.23} Server Framework Runtime language {Lua} local function GetUserNotifications(user\_id, limit, offset) local query = \[\[ …

---

## [Nakama Authoritative multiplayer matchmaking not working](https://forum.heroiclabs.com/t/nakama-authoritative-multiplayer-matchmaking-not-working/5328)

<div class="topic-metadata">

**Author:** [@Ancoder2009](https://forum.heroiclabs.com/u/Ancoder2009)\
**Replies:** 2\
**Last updated:** [June 20, 2024, 6:05pm UTC](https://forum.heroiclabs.com/t/nakama-authoritative-multiplayer-matchmaking-not-working/5328 "2024-06-20T18:05:08Z")

</div>

Whenever I use matchmaker for an authoritative match, the match turns out to be not authoritative. It appears the lua register\_matchmaker\_matched is not even running because the logs aren’t logging. Using Nakama Dock…

---

## [Elementyle - A Chess-like 2D Strategy Game](https://forum.heroiclabs.com/t/elementyle-a-chess-like-2d-strategy-game/5514)

<div class="topic-metadata">

**Author:** [@khamarr3524](https://forum.heroiclabs.com/u/khamarr3524)\
**Replies:** 0\
**Last updated:** [July 25, 2024, 3:56am UTC](https://forum.heroiclabs.com/t/elementyle-a-chess-like-2d-strategy-game/5514 "2024-07-25T03:56:51Z")

</div>

I am very happy to announce here that after over a year of solo development, Elementyle will be coming to Steam as of 7/31/2024! Elementyle is still in alpha-testing but is a free forever game. Updates are regularly p…

---

## [Lua Runtime Match\_Loop messages never populated](https://forum.heroiclabs.com/t/lua-runtime-match-loop-messages-never-populated/5469)

<div class="topic-metadata">

**Author:** [@Gwenny](https://forum.heroiclabs.com/u/Gwenny)\
**Replies:** 9\
**Last updated:** [July 19, 2024, 2:59pm UTC](https://forum.heroiclabs.com/t/lua-runtime-match-loop-messages-never-populated/5469 "2024-07-19T14:59:29Z")

</div>

Using the Lua runtime to implement authoritative match logic. I am using the defold client sdk. Sending data like this: local result = socket.match\_data\_send(matchid, opcodes.send\_input, data) On the serverside: f…

---

## [Understanding Storage Usage](https://forum.heroiclabs.com/t/understanding-storage-usage/2518)

<div class="topic-metadata">

**Author:** [@KittySkin](https://forum.heroiclabs.com/u/KittySkin)\
**Replies:** 3\
**Last updated:** [July 11, 2024, 3:40pm UTC](https://forum.heroiclabs.com/t/understanding-storage-usage/2518 "2024-07-11T15:40:55Z")

</div>

Hello everybody! Im starting working with Nakama and currently trying to understand some things. Im using Lua for language, and trying to get some stuff working. In the API explorer I seems to not being able to store …

---

## [Issues with RPCs in Lua](https://forum.heroiclabs.com/t/issues-with-rpcs-in-lua/5415)

<div class="topic-metadata">

**Author:** [@Bonepixel](https://forum.heroiclabs.com/u/Bonepixel)\
**Replies:** 2\
**Last updated:** [July 4, 2024, 5:04am UTC](https://forum.heroiclabs.com/t/issues-with-rpcs-in-lua/5415 "2024-07-04T05:04:27Z")

</div>

It appears that my RPCs aren’t sending data to the server no sure why please help. :joy: function M.custom\_rpc\_test() local payload = { item = "cowboy" } local body = json.encode(payload) pprint("Encoded JSON Bo…

---

## [No result is received when using socket.match\_data\_send(), although messages are received by the server](https://forum.heroiclabs.com/t/no-result-is-received-when-using-socket-match-data-send-although-messages-are-received-by-the-server/5340)

<div class="topic-metadata">

**Author:** [@SirCez](https://forum.heroiclabs.com/u/SirCez)\
**Replies:** 1\
**Last updated:** [June 12, 2024, 7:40am UTC](https://forum.heroiclabs.com/t/no-result-is-received-when-using-socket-match-data-send-although-messages-are-received-by-the-server/5340 "2024-06-12T07:40:02Z")

</div>

I am having trouble receiving a response when sending match data from the client (Defold) to a Nakama Authoritative match. I have created a fresh server using Docker desktop on Windows and followed the official guide. A…

---

## [Which PRNG algorithm does the lua runtime that nakama provides use?](https://forum.heroiclabs.com/t/which-prng-algorithm-does-the-lua-runtime-that-nakama-provides-use/5297)

<div class="topic-metadata">

**Author:** [@SantiagoSastre](https://forum.heroiclabs.com/u/SantiagoSastre)\
**Replies:** 1\
**Last updated:** [June 1, 2024, 7:41pm UTC](https://forum.heroiclabs.com/t/which-prng-algorithm-does-the-lua-runtime-that-nakama-provides-use/5297 "2024-06-01T19:41:16Z")

</div>

The docs state that: “The Lua runtime is a Lua 5.1-compatible implementation with a small set of additional packages backported from newer versions.” Lua before 5.3 called directly the C rand function, but the newer ver…

---

## [Having issues with sockets in Lua](https://forum.heroiclabs.com/t/having-issues-with-sockets-in-lua/5230)

<div class="topic-metadata">

**Author:** [@Bonepixel](https://forum.heroiclabs.com/u/Bonepixel)\
**Replies:** 0\
**Last updated:** [May 4, 2024, 6:06am UTC](https://forum.heroiclabs.com/t/having-issues-with-sockets-in-lua/5230 "2024-05-04T06:06:52Z")

</div>

Having issues calling socket connect looks like my create socket call is working but when i try to socket connect its a nil value? Any advice / help would be greatly appreciated. local nakama = require "nakama.nakama" l…

---

## [Using Defold / Nakama](https://forum.heroiclabs.com/t/using-defold-nakama/5226)

<div class="topic-metadata">

**Author:** [@Bonepixel](https://forum.heroiclabs.com/u/Bonepixel)\
**Replies:** 1\
**Last updated:** [May 3, 2024, 3:22am UTC](https://forum.heroiclabs.com/t/using-defold-nakama/5226 "2024-05-03T03:22:04Z")

</div>

On local session = nakama\_session.create() i’m passing in my token result and its telling me it needs a token. I’m kinda lost on what its looking for any suggestions? local function authenticate\_with\_device(client) nak…

---

## [Godot 3x html5](https://forum.heroiclabs.com/t/godot-3x-html5/5210)

<div class="topic-metadata">

**Author:** [@luishd23](https://forum.heroiclabs.com/u/luishd23)\
**Replies:** 0\
**Last updated:** [April 25, 2024, 3:21am UTC](https://forum.heroiclabs.com/t/godot-3x-html5/5210 "2024-04-25T03:21:29Z")

</div>

hey I am in the same situation of a Lot people I trying to run my game over html5 I see a Lot people talk about http and https but this is very old have Nakama a solution for this?

---

## [Ingame Mail](https://forum.heroiclabs.com/t/ingame-mail/4268)

<div class="topic-metadata">

**Author:** [@Eatos](https://forum.heroiclabs.com/u/Eatos)\
**Replies:** 10\
**Last updated:** [April 16, 2024, 1:20pm UTC](https://forum.heroiclabs.com/t/ingame-mail/4268 "2024-04-16T13:20:15Z")

</div>

Hello everyone :slight\_smile: Recently we have been thinking to implement in our game an in-game mailbox which currently a lot of games on the market have it as a feature. The ingame mail can server the purpose of: S…

---

## [Delay when a match starts caused by a large dictionary file](https://forum.heroiclabs.com/t/delay-when-a-match-starts-caused-by-a-large-dictionary-file/4984)

<div class="topic-metadata">

**Author:** [@totebo](https://forum.heroiclabs.com/u/totebo)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 5:06pm UTC](https://forum.heroiclabs.com/t/delay-when-a-match-starts-caused-by-a-large-dictionary-file/4984 "2024-04-04T17:06:47Z")

</div>

In my game I use a dictionary to validate words sent to the client. The dictionary is ~2MB and loaded at runtime in the match init. This leads to a delay of a few seconds when a match is started. I use Lua. To reduce th…

---

## [Error creating match main.lua](https://forum.heroiclabs.com/t/error-creating-match-main-lua/5108)

<div class="topic-metadata">

**Author:** [@F1ow](https://forum.heroiclabs.com/u/F1ow)\
**Replies:** 9\
**Last updated:** [April 1, 2024, 12:03pm UTC](https://forum.heroiclabs.com/t/error-creating-match-main-lua/5108 "2024-04-01T12:03:03Z")

</div>

When i trying to create Authoritative match i get error. nakama\_server-nakama-1 | {“level”:“error”,“ts”:“2024-03-31T21:09:56.468Z”,“caller”:“server/matchmaker.go:388”,“msg”:“Error running Matchmaker Matched hook.”…

---

## [Fleet Manager with lua scripting](https://forum.heroiclabs.com/t/fleet-manager-with-lua-scripting/5092)

<div class="topic-metadata">

**Author:** [@fds31d01](https://forum.heroiclabs.com/u/fds31d01)\
**Replies:** 1\
**Last updated:** [March 27, 2024, 5:18pm UTC](https://forum.heroiclabs.com/t/fleet-manager-with-lua-scripting/5092 "2024-03-27T17:18:27Z")

</div>

Hello, just went through the Fleet Manager documentation, just wondering if the feature is also available from lua scripting? Thanks

---

## [Lua server](https://forum.heroiclabs.com/t/lua-server/5071)

<div class="topic-metadata">

**Author:** [@F1ow](https://forum.heroiclabs.com/u/F1ow)\
**Replies:** 2\
**Last updated:** [March 22, 2024, 11:59am UTC](https://forum.heroiclabs.com/t/lua-server/5071 "2024-03-22T11:59:25Z")

</div>

I wanted to create a game with a server in lua. I found an example of a server script on github - game-xoxo-nakama-server/main.lua at main · defold/game-xoxo-nakama-server · GitHub Here the function is -nk.run\_once(funct…

---

## [Why Lua language?](https://forum.heroiclabs.com/t/why-lua-language/5010)

<div class="topic-metadata">

**Author:** [@Mahdihp](https://forum.heroiclabs.com/u/Mahdihp)\
**Replies:** 1\
**Last updated:** [March 1, 2024, 3:26pm UTC](https://forum.heroiclabs.com/t/why-lua-language/5010 "2024-03-01T15:26:32Z")

</div>

What parts are written in Lua language? Or for what parts the Lua language is used? Or I am a Gulang programmer I can use this source For logic my games

---

## [Trouble Retrieving Lua Server Stored Data on Godot Client](https://forum.heroiclabs.com/t/trouble-retrieving-lua-server-stored-data-on-godot-client/4958)

<div class="topic-metadata">

**Author:** [@districtjackson](https://forum.heroiclabs.com/u/districtjackson)\
**Replies:** 9\
**Last updated:** [February 13, 2024, 1:12pm UTC](https://forum.heroiclabs.com/t/trouble-retrieving-lua-server-stored-data-on-godot-client/4958 "2024-02-13T13:12:25Z")

</div>

Hi there! I’m currently trying to build a system that generates shareable match\_ids (match codes, as I’m calling them) that allow players to join games using the code for my Lua/Godot game. I’m doing it in a manner sugg…

---

## [Server Function To List Parties](https://forum.heroiclabs.com/t/server-function-to-list-parties/4499)

<div class="topic-metadata">

**Author:** [@hamzaRetrocube](https://forum.heroiclabs.com/u/hamzaRetrocube)\
**Replies:** 2\
**Last updated:** [January 2, 2024, 7:07am UTC](https://forum.heroiclabs.com/t/server-function-to-list-parties/4499 "2024-01-02T07:07:59Z")

</div>

Hello, I would like to know if there is any function present in server framework which gives me a list of open parties. I am using the party system in my game and sharing the created party id on social media platforms b…

[Next page](https://forum.heroiclabs.com/tag/lua/30.md?match_all_tags=true&page=1&tags%5B%5D=lua)
