Hey there, hope you are having a good day.
There seem to be a problem here!
I want to make a loop that creates table per table then sets a value for the last, for example:
This is the table i want to loop through
local array = {"hi","bye","test"}
local value = 99
How can i make it so it will display like:
{
["hi"] = {
["bye"] = {
["test"] = 99
}
}
}
Just in case if I add another value named lol
then how can i make value go to lol
instead of test?
local array = {"hi","bye","test","lol"}
local value = 99
I want:
{
["hi"] = {
["bye"] = {
["test"] = {
["lol"] = 99
}
}
}
}
I’ve been trying this for hours i’ve even tried to find but can’t find any solutions, (I know theres something related with maths, but i suck at maths!)
any help would be appreciated.
Regards.