You shouldn't post code without including all variables that are referenced. You should also include more information about what you are trying to do.
"how to make load points with loop? Without loop they are loading fine."
How many items are stored in each vault entry?
Is g_iPoints a 2-dimensional array and sized large enough?
What is the value of g_iTotal?
You should make sure g_iTotal is a constant variable and that its value is never larger than the size of the second dimension of g_iPoints or else you can run into index out of bounds errors.