foreach question.
#1

Hey guys!
Umm, I wanted to know what exactly does these lines mean and what are they used for.
Would somebody be so kind and fully explain it to me? (and yes, i have read the foreach post)

Код:
new Iterator:Some<10>; // I do not know what does the '<10>' mean and why do I need it there.
Iter_Add(Some, 5);
Iter_Add(Some, 9);
Reply
#2

Ahh, I get it now.

Thank you very much!


But let's say I want to loop through all the vehicles on the server, how would I do that?

Код:
new Iterator:Vehicles<MAX_VEHICLES>;
foreach (new i : Vehicles)
{
    printf("%d", i);
}
would that work?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)