is there any way I can refer to an entire table? for example: I want to know if in any of the elements of this table, there is the variable "Hello World" without having to refer exactly to its exact position: "if Table [2] ==" Hellow World "then ... is there any way?
✓ ANSWER ACCEPTED
is there any way I can refer to an entire table?
1 answer
✓ Accepted answer
You can go through the entire table using a for loop. Judging by your question, you're looking to see if any values are "Hello World".
for i,v in pairs(table) do
if table[i].Value == "Hello World" then
--put whatever you want here
break -- exits the loop, only happens if the condition above is true.
end
end
I haven't tried it but it should work. Let me know if any errors happen.
1 comment
0
I also haven't tested it but thanks!
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
Do you mean getting every variable in the table?
yes, to look for another variable