vat21s
|
  |
| Joined: 07 Jun 2010 |
| Total Posts: 2508 |
|
|
| 06 Apr 2015 03:37 AM |
| and get stuff as an argument too. |
|
|
| Report Abuse |
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 06 Apr 2015 03:40 AM |
local stuff = { a = function() print(1) end }
stuff:a()
I script -~ chimmihc |
|
|
| Report Abuse |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Apr 2015 03:40 AM |
They are methods, when you do: tbl:method(arg), it technically does the exact same thing as: tbl.method(tbl, arg)
Meaning: local tbl = {}; tbl.method = function(self, arg) print(arg); end; tbl:method("Hello, world!"); tbl.method(tbl, "How are you world?"); |
|
|
| Report Abuse |
|