Jump to content




Table help


  • You cannot reply to this topic
2 replies to this topic

#1 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 16 September 2012 - 09:50 PM

How would I check a var against everything in a table?

#2 Noodle

  • Members
  • 989 posts
  • LocationSometime.

Posted 16 September 2012 - 09: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


#3 Sammich Lord

    IRC Addict

  • Members
  • 1,212 posts
  • LocationThe Sammich Kingdom

Posted 17 September 2012 - 06:59 AM

Thanks man.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users