I have an array gCollectible[5] = (0 0 0 0 0)

Each time I get one of the collectibles I change one of the array to 1.

I want to display this in a window, so I use a variable to count how many of these are 1's. The problem is they way it counts it counts the first one once, then the second twice, then the third three times, and so on. Here is my code. What is wrong with it?

`(for (= i 0) (< i 5) (++i)`

(if(> gCollectible[i] 0)

++variable

)

)

If the array is [1 1 1 1 1] shouldn't variable be 5? It gives me the value 15...