• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Please help me to learn ;DD

Cronos

New Member
Joined
Jul 2, 2007
Messages
51
Reaction score
0
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
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]
 
Back
Top