Orelegus
|
  |
| Joined: 29 May 2008 |
| Total Posts: 856 |
|
|
| 21 Oct 2014 05:59 PM |
How do you determine if 2 different Tables have values in the same position? Example:
Arr1 = {1,2,3,4,5} Arr2 = {2,4,7,8,9}
If I pick 9 from Arr2. How would I make it pick 5 in Arr 1. Same thing for 7. If I picked 7, how would I make it pick 3? |
|
|
| Report Abuse |
|
|
|
| 21 Oct 2014 06:00 PM |
| if Arr1[3] == Arr2[3] then -- that means that if the 3rd number in Arr1 is equal to the 3rd number in Arr2, it'll do something |
|
|
| Report Abuse |
|
|
Orelegus
|
  |
| Joined: 29 May 2008 |
| Total Posts: 856 |
|
|
| 21 Oct 2014 06:02 PM |
| I can't believe I forgot that.. I havn't worked with tables in a while. Thanks. |
|
|
| Report Abuse |
|
|
Orelegus
|
  |
| Joined: 29 May 2008 |
| Total Posts: 856 |
|
|
| 21 Oct 2014 06:03 PM |
| Wait, but I'm using a (for i) loop. |
|
|
| Report Abuse |
|
|
Orelegus
|
  |
| Joined: 29 May 2008 |
| Total Posts: 856 |
|
|
| 21 Oct 2014 06:04 PM |
| Nvm, it would be Arr1[i] == Arr2[i] |
|
|
| Report Abuse |
|
|