x and y are the weapon's or player's variable, and there's a conflict of common variable.
this.objects = new[this.objectcount][3][2];
PHP Code:
for(i=0;i<this.objectscount;i++) {
this.objects[i][coords][x] = random(this.range.xy[x][1],this.range.xy[x][2]);
this.objects[i][coords][y] = random(this.range.xy[y][1],this.range.xy[y][2]);
this.objects[i][delta][x] = random(this.range.dxy[x][1],this.range.dxy[x][2]);
this.objects[i][delta][y] = random(this.range.dxy[y][1],this.range.dxy[y][2]);
this.objects[i][extra][1] = int(random(0,2)); // bool
this.objects[i][extra][2] = random(this.range.mass[1],this.range.mass[2]);
sleep .05;
}
That part is very messy.
PHP Code:
for(i=0;i<this.objectscount;i++) {
this.objects[i][0][0] = random(-5,5);
this.objects[i][0][1] = random(-60,60);
this.objects[i][1][0] = random(-5,5);
this.objects[i][1][1] = random(-60,60);
this.objects[i][2][0] = int(random(0,2)); // bool
this.objects[i][2][1] = random(1,500);
sleep .05;
}
Some repeated errors were that you count "1,2,3,4", but the array are counted "0,1,2,3". Most of the time, you were asking for arrays that didn't even exist.
Other then that, you were trying to initiate arrays that weren't even called (You only have 5 arrays, you didn't include three subarrays it's 2 sub arrays for them)