Sorry i mean i want to draw_text to the amount of item i have.
This is my code
draw_text(0, 0,tsprint("POTION x", global. Inventory_qty[item_POTION]))
Are this wrong?
First put this in its own script,
function inventory_get_qty(item_id) {
for(var c = 0; c < global.inventory_items; c++){
if(global.inventory_item[c] == item_id){
return global.inventory_qty[c];
}
}
return 0;
}Then you can draw the quantity with,
draw_text(0, 0,tsprintf("POTION %", inventory_get_qty(item_POTION)))