Search found 5 matches
- Fri Mar 16, 2012 9:25 pm
- Forum: Support and Development
- Topic: Dynamically call different child tables.
- Replies: 4
- Views: 2347
Re: Dynamically call different child tables.
Thanks for the helpful answer trubblegum!
- Fri Mar 16, 2012 8:47 pm
- Forum: Support and Development
- Topic: Dynamically call different child tables.
- Replies: 4
- Views: 2347
Dynamically call different child tables.
I have a table.
It has some child tables.
I have a function that sets and prints the table
This currently returns nil. Any idea how to make this work without setting x = tbl.b?
Code: Select all
tbl = {}
Code: Select all
tbl.a = 1
tbl.b = 2
tbl.c = 3
Code: Select all
function tblscan()
x = b
print(tbl.x)
end
- Thu Mar 15, 2012 10:24 am
- Forum: Support and Development
- Topic: Getting the key table?
- Replies: 8
- Views: 6794
Re: Getting the key table?
Thanks for all the advice, I'll just pass the parent table along with the child table in the function in that case!
- Thu Mar 15, 2012 7:29 am
- Forum: Support and Development
- Topic: Getting the key table?
- Replies: 8
- Views: 6794
Re: Getting the key table?
So there is no way to tell what the parent table is then?
- Thu Mar 15, 2012 6:43 am
- Forum: Support and Development
- Topic: Getting the key table?
- Replies: 8
- Views: 6794
Getting the key table?
I think I phrased that correctly... I didn't did I? Here is an example of what I'm trying to do since my programming is rusty: //Tables with Values Table1 = { innerTable = {} } Table2 = { innerTable = {} } //My function function CheckSource(table) if table == Table1 then STUFF elseif table == Table2...