Hello everyone, i want to request this.
Lua Rocks!, bit i want learn more =)
If someone could explain to me the purpose of these functions , or what is, all please.
I will be very grateful. (Sorry for sux english)
Example1
Whats Metatable, __index?, self??
WHY HE DO THAT -.-
Example2
Example3
Please explain me,
Cronos.
Pd. Colandus make a football function
I remeber local dir = pos_player % 2 == 1 and "x" or "y"
I learn that searching in google, % = mod ;DDD
Colandus Rox and Nostradamus and Helveg and Jiddo and Pedro.B and Ispiro and Elf and Talanturen and X.Ghost. hahaha
My e-mail: [email protected]
Lua Rocks!, bit i want learn more =)
If someone could explain to me the purpose of these functions , or what is, all please.
I will be very grateful. (Sorry for sux english)
Example1
Code:
-- Creates a new queue, connected to the given NpcHandler handler
function Queue:new(handler)
local obj = {}
obj.handler = handler
obj.customers = {}
setmetatable(obj, self)
self.__index = self
return obj
end
Whats Metatable, __index?, self??
WHY HE DO THAT -.-
Example2
Code:
lol = {}
lol.__index = lol
Example3
Code:
local obj = {}
setmetatable(obj, self)
self.__index = self
Please explain me,
Cronos.
Pd. Colandus make a football function
I remeber local dir = pos_player % 2 == 1 and "x" or "y"
I learn that searching in google, % = mod ;DDD
Colandus Rox and Nostradamus and Helveg and Jiddo and Pedro.B and Ispiro and Elf and Talanturen and X.Ghost. hahaha
My e-mail: [email protected]