python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Random number generation problem with meta table
Please look at the next code, Lua.
randomNumber = {
new = function(self,o)
o = o or {}
setmetatable(o, self)
self.__index = self
return o
end,
math.randomseed(os.time()),
getNum = ...
user3886365
Votes: 0
Answers: 2
(Lua) Simple metatable in another file
I'm sorry that it is such a basic issue but I can't seem to understand. I'm a beginner in Lua and so I have several questions.
My goal is to make a small "class" Vector3. I'm using a metatab...
Meteion
Votes: 0
Answers: 1
luajit how to automatically set default metatable to every newly created table?
I have a personal project and a pure lua writed object module which provides metatable with methods filter map etc to a table , I don't want to require and setmetatable for every line local foo={}

tcpiper
Votes: 0
Answers: 2