Hello !
-
What do you want to achieve?
I want to get the value of a key in a table: Exemple:
local Table = {
["World 1"] = "Volcano";
["World 2"] = " Island";
["World 3"] = "Sea"
}
-
What is the issue?
So, for exemple, i want to get “Island” by searching “World 2” in the table but not by searching everything usingfor i, v in pairs() do end
-
What solutions have you tried so far?
I tried to usefor i, v in pairs() do end
, but then, using this, i need to useif /// then /// elseif /// end
but the script is getting weird if i have more than 50 world because it means i need to spam 50 timeselseif
in my script
So, i read many topics about tables, but nothing is answering my question: everyone use
for key, value in pairs(testDictionary) do
print(key, value)
end
Thanks for helping !
Have a good day, bye !