intpoints[] = expandpointgroup(0, chs("group"));
intn = len(points);
for (inti = 0; i < n; ++i) {intpt = points[i];
...
}
However, it's important to note that you'll need to do this with “Run Over” set to “Detail (Only Once)”; in that case, the node won't use the Group field for its own iteration, since it will run only once. What's happening in the snippet you posted is that VEX effectively runs the code snippet independently for each point, so each one creates a new variable i, sets it to zero, then prints that out.