[SOLVED] How to get the variable name by its value?

Hello Community, I need to get the variable name by its value, for example:

i = 1 print ( i ) --Prints 1 print ( 1 ) --I need that the terminal prints "i" (the variable name) and not 1 [import]uid: 81091 topic_id: 19625 reply_id: 319625[/import]

you can do this with table,like
[lua]local t = {}
t[1] = “i”
t[2] = “1”

for k,v in pairs(t) do
if v == “i” then
print(v)
end
end[/lua]
[import]uid: 16142 topic_id: 19625 reply_id: 75815[/import]

Hey man, finally I fixed something that I needed to, thank you so much. [import]uid: 81091 topic_id: 19625 reply_id: 75819[/import]

you’re welcome, glad to help) [import]uid: 16142 topic_id: 19625 reply_id: 75822[/import]