Issue
C# has this and VB has ME. What is the Lua equivalent?
I am trying to reference the parent of the script class in Roblox.
Solution
From the Lua documentation section 2.5.9, the self reference is usually self:
The colon syntax is used for defining methods, that is, functions that have an implicit extra parameter
self. Thus, the statementfunction t.a.b.c:f (params) body endis syntactic sugar for
t.a.b.c.f = function (self, params) body end
Answered By - Greg Hewgill Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.