Search found 5 matches

by Otoris
Fri Mar 16, 2012 9:25 pm
Forum: Support and Development
Topic: Dynamically call different child tables.
Replies: 4
Views: 644

Re: Dynamically call different child tables.

Thanks for the helpful answer trubblegum!
by Otoris
Fri Mar 16, 2012 8:47 pm
Forum: Support and Development
Topic: Dynamically call different child tables.
Replies: 4
Views: 644

Dynamically call different child tables.

I have a table.

Code: Select all

tbl = {}
It has some child tables.

Code: Select all

tbl.a = 1
tbl.b = 2
tbl.c = 3
I have a function that sets and prints the table

Code: Select all

 
function tblscan()
    x = b
    print(tbl.x)
end
This currently returns nil. Any idea how to make this work without setting x = tbl.b?
by Otoris
Thu Mar 15, 2012 10:24 am
Forum: Support and Development
Topic: Getting the key table?
Replies: 8
Views: 1942

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!
by Otoris
Thu Mar 15, 2012 7:29 am
Forum: Support and Development
Topic: Getting the key table?
Replies: 8
Views: 1942

Re: Getting the key table?

So there is no way to tell what the parent table is then?
by Otoris
Thu Mar 15, 2012 6:43 am
Forum: Support and Development
Topic: Getting the key table?
Replies: 8
Views: 1942

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...