The problem is that my code is not working as expected, and instead of printing the table’s name, it’s printing this:
table: 0xda246ce7531b6e8c
This started to happen me time ago, and i didn’t know what to do, i tried to search articles or threads, and i didn’t find one that helped me, i want to repeat that i want to print the table name, not the value. Thanks for reading.
The _ is actually the index, which is the name of the table. pront is the value, which refers to the (reference of the) table. If you want to print the table’s name, you’d have to print the index.
Well, what i want to do is print the name tables that are inside the table called “Gi”, i don’t want to print “Gi”, i want to print “Lol”, “lal”. And not the values.
@kingdom5 I tried to require the script, but that didn’t work:
local Table = {["Test1"] = {["Hi"] = 1, "Ho"}}
local Module = require(script.Parent.tablePrint)
Module.printTable(Table)
For any reason, i don’t think it’s your module, i got this error:
Workspace.Script:15: attempt to index local 'Module' (a function value)
Sorry, but i want to do this automatically, that’s the only way to do it in the current script that i’m working. What i mean with automatic is that will get the names without having to write an actual name to search. I don’t know if i understood, because i got confused while i was reading your post, but thanks for helping too, i hope you explain it a bit.
@incapaxx - Thanks for helping!
@kingdom5 - Your module didn’t help me, but thanks for providing me that module! Is going to be useful for the future, back to the thread, this is what i wanted to print: