Hi there,
Currently I have a dictionary in my code to work a question-answer system.
I am trying to find if the user entered the right answer, and for a bonus round, the right question [something easy and have multiple answers].
I need some way to view the answer of a dictionary.
My code:
qa= {["Question"] = "Answer"}
function searcht(table, word)
for i = 1,#table do
if table[i] == word then
return table[i]
else
return nil
end
end
end
searcht(qa, "Question")`
Any help would be apprechiated!
Thanks.

1 comment
Thanks a bunch!