About foreach
#1

Hi

Can i store values like this in foreach variables?

{playerID, posX, posY, posZ}
------------------------------------

item 1 {1, xxx.x, yyy.y, zzz.z}
item 2 {2, xxx.x, yyy.y, zzz.z}
etc.
Reply
#2

Foreach is a loop. I am not sure why you'd want to store anything in it? What you could do I am guessing is use it to loop a specific identifier of an array and store the rest of the information in that array?

pawn Код:
new
    Iterator:IterArray[12]<5>;
Iter_Init(IterArray);
You have to intialize the array, however you can read the rest yourself right here:

foreach.inc

The thing I posted is from the DECLARATIONS part of that topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)