|
| 27 Dec 2015 10:12 PM |
for example is there a way i could find "red" in the following table
local colors = { "blue", "red", "green' } |
|
|
| Report Abuse |
|
|
Vyxium
|
  |
| Joined: 31 Aug 2010 |
| Total Posts: 1020 |
|
|
| 27 Dec 2015 10:14 PM |
for i, v in pairs(colors) do if v == "red" then --do stuff end end |
|
|
| Report Abuse |
|
|
|
| 27 Dec 2015 10:21 PM |
and i could get the index from that too right
ok i think i remember now |
|
|
| Report Abuse |
|
|
Vescatur
|
  |
| Joined: 18 Feb 2012 |
| Total Posts: 3426 |
|
|
| 27 Dec 2015 10:22 PM |
the index in his example is i
so yes you could get the index from that.
rut.acs://eV |
|
|
| Report Abuse |
|
|