Ignore the below posts, they are about a different problem.Ã, My problem now is with GP_NUMINVITEMS.Ã, I have this:
Code: ags
In my script, however, I get an error saying the array index is 3, and the inventory items vars are 1-2.Ã, I have created only two inventory items, and the while function SHOULD stop the script upon overwhat hitting 3 shouldn't it?Ã, What's wrong now?
Ã, Ã, overwhat = 0;
while (overwhat <= GP_NUMINVITEMS) {
Ã, Ã, Ã, if (InventoryItem.GetAtScreenXY(mouse.x, mouse.y) == inventory[overwhat]) {
//some stuff
overwhat ++;
//more stuff
In my script, however, I get an error saying the array index is 3, and the inventory items vars are 1-2.Ã, I have created only two inventory items, and the while function SHOULD stop the script upon overwhat hitting 3 shouldn't it?Ã, What's wrong now?