object.Error@(0): Integer Divide by Zero Why is this happening? Does anybody know?
data[0] = (new egg(0,0,"a"));
Here you set data[0].y to 0
tempb = data[x].y;
In the first iteration, this equals data[0].y which equals 0
temp = tempa / tempb;
And then you divide by zero here, hence the error