- Points
- 131
- Digest
- 0
- R.P.
- 20
- Joined
- 2011-9-4
- Last visit
- 2011-11-24
- Posts
- 33

|
i figured it out, it was the way i was creating the array. the manual makes it sound like
var foo = new Array(2);
should create a new array with 2 elements... that doesnt even compile right, when i was having the problem it was compiling before it was somehow bcs i forgot the ;. when i saw that i figured out a way to make it work using a sort of dirty hack but im curious... how do i init an empty array with x, or even 0 elements?
right now im just using
var foo = [x,x];
but i dont really want to have to immediately define the elements, i want the engine to dynamically update them as my enemy list. |
|