ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 20 Aug 2013 06:40 PM |
So just to clear this up in my mind
A meta table is simply a table containing other tables like metadata on a file or something?
Lobster in disguise |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Aug 2013 06:43 PM |
metatable* and no.
A metatable is pretty much a table within a table. |
|
|
| Report Abuse |
|
|
josh50000
|
  |
| Joined: 29 Nov 2009 |
| Total Posts: 697 |
|
|
| 20 Aug 2013 06:43 PM |
| Its basically a table inside a table. |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 20 Aug 2013 06:44 PM |
a table or multiple tables inside a table
Lobster in disguise |
|
|
| Report Abuse |
|
|
lupine
|
  |
| Joined: 24 Jun 2008 |
| Total Posts: 3561 |
|
|
| 20 Aug 2013 06:45 PM |
I haven't done much in the realm of metatables, why not just do
OverlordTable = { UnderlingTable = {"Blue"}, Minion = {"Red", "White"} }
? |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 20 Aug 2013 06:46 PM |
oh wait i dont even need metatable for what im thinking about
oops sorry
Lobster in disguise |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 20 Aug 2013 06:47 PM |
Because of metamethods.
local Table = {"val", "val"} local MetaTable = { __call = function(tbl, val) print("Do what you want when they call the table") end } setmetatable(Table, MetaTable)
|
|
|
| Report Abuse |
|
|