Hi, I am currently trying to make a GUI based inventory system, and for some reason using a loop will not work.
i is the column count I could say, after 8 it should become 0 and j which is the row number should be added to 1.
Anyone have any ideas?
PHP Code:
this.count = 0;
this.i = 0;
this.j = 0;
while (this.count < this.weplist.size) {//weplist.size does have a value
new GuiButtonCtrl("inv_obj_" @ this.count) {
profile = GuiBlueButtonProfile;
x = i *((parent.width-20)/8);
y = j *((parent.height-20) / ( int(this.weplist.size) ) );
width = ((parent.width-40)/8);
height = ((parent.width-40)/8);
text = this.weplist[this.count];
}
this.count++;
this.i++;
if (this.i>8) {//I put 8 Items on each row so after it adds to row#
this.j++;
this.i=0;
}
}