I'm working with this:
chars = {
["Nigo Astran"]="1",
["pantera"]="2"
}
nchar = (chars[$name])+1
The variable $name will give me a string that I'm logged in to, in this case : "Nigo Astran"
and nchar
has the value "2"
if I'm in "Nigo Astran"
, and so on. I believe you get the idea.
Now, I want to get the key from the value, example:
when nchar
is 2
it should give me "pantera"
as the key. I'm just not getting the value of the key.