diff --git a/Spaceinator.project.gmx b/Spaceinator.project.gmx
index 932f6a2..d58eca4 100644
--- a/Spaceinator.project.gmx
+++ b/Spaceinator.project.gmx
@@ -35,6 +35,7 @@
+
@@ -58,7 +59,7 @@
-
+
diff --git a/scripts/use_item_in_inventory.gml b/scripts/use_item_in_inventory.gml
index 82e9bc2..6fecaf5 100644
--- a/scripts/use_item_in_inventory.gml
+++ b/scripts/use_item_in_inventory.gml
@@ -1,12 +1,12 @@
///use_item_in_inventory(slot)
var slotno = argument0;
-var count = obj_inv_controller.inventoryCount[slot];
+var count = obj_inv_controller.inventoryCount[slotno];
count--;
-obj_inv_controller.inventoryCount[slot] = count;
+obj_inv_controller.inventoryCount[slotno] = count;
if(count <= 0)
{
- obj_inv_controller.inventory[slot] = 0;
- obj_inv_controller.inventoryCount[slot] = 0;
+ obj_inv_controller.inventory[slotno] = 0;
+ obj_inv_controller.inventoryCount[slotno] = 0;
}