Iterator
#1

I wonder if I can change this code to Iterator:
pawn Код:
new Float:A[2][3] =
{
    {0.0,0.0,0.0},
    {0.0,0.0,0.0}
};

for(new i=0;i<sizeof(A);i++)
{   if(IsPlayerInRangeOfPoint(playerid,20,A[i][0],A[i][1],A[i][2]))
    {   SendClientMessage(playerid,Red,"WOALA");
        return 1;}}
Reply
#2

What do you exactly mean? I didn't understand your question quite well.
Reply
#3

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
What do you exactly mean? I didn't understand your question quite well.
I think he wants to add it for a foreach version ( Iter_Add )

Honestly, I really need something like this too!
Reply
#4

Just like what Basicz said.
Btw bump.
Reply
#5

Another bump.
Reply
#6

More bump
Reply
#7

I'm getting tired of bumping this topic.
Btw more bump.
Reply
#8

Forum rule: B - Don't bump a topic unless the last post is 48 hours old
Reply
#9

pawn Код:
new Iterator:A<2>;

new Float:A[2][3] =
{
    {0.0,0.0,0.0},
    {0.0,0.0,0.0}
};

foreach(A, i)
{
    if(IsPlayerInRangeOfPoint(playerid,20,A[i][0],A[i][1],A[i][2]))
    {
       SendClientMessage(playerid,Red,"WOALA");
        return 1;
    }
}
Try.....not sure didnt tested
Reply
#10

"new Float:A[2][3]" create new variable called A, not adding data to iterator A (I guess).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)