How to save X amount of an Item to a Variable

I am hoping to save myself a bit of work.

What I am wanting to do is equal a variable to X amount of an item.  I was trying a few different ways but I kept getting syntax errors so I was hoping maybe someone could help me with this.

An example of what I'm trying to accomplish would be something like this:

Control Variables: [001:Custom.Variable1] = ($data_items[id],amount)

Any help would be appreciated 🙂
why do you use script values at all?


If you only want to know how much of an item the party has in inventory, just control variable : game data : item (X) in inventory


Finish


If you want something else, please explain what you want to do
why do you use script values at all?

If you only want to know how much of an item the party has in inventory, just control variable : game data : item (X) in inventory

Finish

If you want something else, please explain what you want to do
Oh I see.  Well I might can work with that then, ty. I wasn't sure if that option in the game data kept track of the amount of the item also or rather it just checked to see if it was in the inventory.  

What I am wanting to do is let the player input a number then subtract that number from the total amount of the item the player has in their inventory.  It has to do with augmenting gear on my game.  The player collects certain items they can use on gear to increase stats ect. and I want them to be able to use many items at once if they wish so it doesn't get repetitive. 

#EDIT

I was able to get it to work like I wanted just by using the game data like you suggested.  So this ended up being a lot easier than I was expecting.  Thank you much for the help.  Appreciate it. ^^
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-save-x-amount-of-an-item-to-a-variable.22386/