You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to know why it is not working as intended, please : D -
What is the issue? Include screenshots / videos if possible!
Why is the table not sorting my strings = integer and when inserting a string = integer to the table the output is 1 = false. The output is also not in order
-- local newtable = {
["value1"] = 10,
["value2"] = 20,
["value3" ] = 5
}
print(newtable)
local newco = coroutine.create(function()
while task.wait(4) do
table.sort(newtable,function(a,b)
return a > b
end)
for i,v in pairs(newtable) do
print(i,v)
end
end
end)
coroutine.resume(newco)
for i,v in pairs(newtable) do
print(i,v)
end
table.insert(newtable, "value4" == 15) -- when inserted I am getting 1 false since commas
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.