for - doesn't itter last array element
#1

I'm trying to do special loop, which iterates every array element. I've got this:

pawn Код:
new const Skins[] =
    {
        105, //0
        106, //1
        107, //2
        102, //3
        103, //4
        104, //5
        114, //6
        115, //7
        116, //8
        108, //9
        109, //10
        110, //11
        121, //12
        122, //13
        124, //14
        126, //15
        113  //16
    };

    for(new skin = Skins[0], skin_index = 1; skin_index < sizeof(Skins); skin = Skins[skin_index++])
        printf("%d", skin);

    print("Text"); //Debug
But doesn't iterate last array element:
Quote:
Originally Posted by console
[19:43:20] 105
[19:43:20] 106
[19:43:20] 107
[19:43:20] 102
[19:43:20] 103
[19:43:20] 104
[19:43:20] 114
[19:43:20] 115
[19:43:20] 116
[19:43:20] 108
[19:43:20] 109
[19:43:20] 110
[19:43:20] 121
[19:43:20] 122
[19:43:20] 124
[19:43:20] 126 //there's no 113 :/
[19:43:20] Text
Reply


Messages In This Thread
for - doesn't itter last array element - by ziomal432 - 31.08.2010, 17:40
Re: for - doesn't itter last array element - by Mauzen - 31.08.2010, 17:47
Re: for - doesn't itter last array element - by ziomal432 - 31.08.2010, 17:50
Re: for - doesn't itter last array element - by Mauzen - 31.08.2010, 17:51
Re: for - doesn't itter last array element - by ziomal432 - 31.08.2010, 17:53
Re: for - doesn't itter last array element - by ziomal432 - 31.08.2010, 17:57
Re: for - doesn't itter last array element - by Mauzen - 31.08.2010, 18:17

Forum Jump:


Users browsing this thread: 1 Guest(s)