Get value at index with foreach
#1

Hi guys,

I have a foreach iterator which stores some array indexes and I use it in a dialog, now I need to access the original array at the index stored in the "listitem" index of the foreach iterator, someone know how can I do this?

e.g:
pawn Код:
new IntArray[][E_INT_INFO] = {
{0.0000, 0.000, 3.000},
{124.1524, -67.2987, 1.5782}
// ...
};

Iter_Add(IntIter, 1); // Adding the second element of IntArray
Iter_Add(IntIter, 7);
Now, when I use the foreach in the dialog it shows IntArray[1] at index 0 intArray[7] at index 1 and so on..
I'd like to get the value from the foreach iterator at index "listitem" (Intiter[listitem])
Reply


Messages In This Thread
Get value at index with foreach - by Aviicix - 11.04.2017, 14:46
Re: Get value at index with foreach - by Aviicix - 11.04.2017, 15:14
Re: Get value at index with foreach - by Aviicix - 12.04.2017, 09:50
Re: Get value at index with foreach - by OneDay - 12.04.2017, 09:54
Re: Get value at index with foreach - by Aviicix - 12.04.2017, 10:09
Re: Get value at index with foreach - by raydx - 12.04.2017, 10:31
Re: Get value at index with foreach - by Aviicix - 13.04.2017, 21:26
Re: Get value at index with foreach - by DRIFT_HUNTER - 13.04.2017, 22:38
Re: Get value at index with foreach - by Aviicix - 14.04.2017, 07:20

Forum Jump:


Users browsing this thread: 1 Guest(s)