05.09.2010, 07:44
Wow, didn't even see that Calgon. Here I was typing up a large post when it wasn't needed
However, something else I noticed in your code. It seems as if you're wasting an entire row of memory in your array. Array indexes start at 0 and end at size - 1. So you should really change your for loop to something like below else you're just wasting memory. It may only be a matter of bytes now, but you could possibly keep this "habit" and waste a significant amount of memory in larger projects.
From:
for (new idx = 1; idx<=totalpickups; idx++)
To:
for (new idx = 0; idx< totalpickups; idx++)
However, something else I noticed in your code. It seems as if you're wasting an entire row of memory in your array. Array indexes start at 0 and end at size - 1. So you should really change your for loop to something like below else you're just wasting memory. It may only be a matter of bytes now, but you could possibly keep this "habit" and waste a significant amount of memory in larger projects.
From:
for (new idx = 1; idx<=totalpickups; idx++)
To:
for (new idx = 0; idx< totalpickups; idx++)