This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Sammich Lord's profile picture

Table help

Started by Sammich Lord, 16 September 2012 - 08:50 PM
Sammich Lord #1
Posted 16 September 2012 - 10:50 PM
How would I check a var against everything in a table?
Noodle #2
Posted 16 September 2012 - 10:57 PM
What exactly do you mean?
A conditional to check the values of a table??
table_name = { {value = "chicken"} }
for k, v in pairs(table_name) do
 if v.value == "chicken" then
  print("CHICKEN")
 end
end
Sammich Lord #3
Posted 17 September 2012 - 07:59 AM
Thanks man.