Our great sponsors
-
minetest_game
Minetest Game - A lightweight and well-maintained base for modding [https://github.com/minetest/minetest/]
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Consider the variables declared inside the function map.update_hud_flags() in https://github.com/minetest/minetest_game/blob/master/mods/map/init.lua: what does the word local do in those declarations? Could it be omitted?
good question. A file is actually very much like a function: it can't accept arguments, but it can have a return statement (it's called a chunk instead of function according to the lua doc though). Usually people make modules as files that return a table with their functions, then that can be loaded with require (there's an example in this thread). I've also seen some small libraries that only contain one function, like pprint.lua: they way it works is that pprint.lua is like