I know how to zip a file but can that even be uploaded here? I feel like I'm causing you too much trouble than it should. It's my fault I'm having trouble understanding.

Would it also be easier if you just redid your post here?

Withdraw:

Set variable A to the number of cookies the player could possibly hold (99).

Subtract from variable A the number of cookies the player is actually holding (90).

Leaves you with 9 - the number of cookies the player can take from storage.

Set variable B to the number of cookies IN storage.

If A is less than B, then the player can take A cookies (9).

If B is less than A, then the player can take B cookies.

Deposit:

Set variable A to the number of cookies that can be stored (999).

Subtract from variable A the number of cookies that are actually in storage.

Set variable B to the number of cookies the player currently has.

If A is less than B, then the player can put A cookies into storage.

If B is less than A, then the player can put B cookies into storage.

In both cases, it's all done with Control Variables and Conditional Branches.

I think it would help me if Variables A and B had names. For a visual. It looks like four variables are used for this kind of event.

1. The number of cookies held

2. The number of cookies in storage

3. A number to ensure you don't go over the max of 99 or 999

4. What number the player inputted

but I don't see where would Change item based on the variable would go? I thought variables would help determine how much items are deposited or withdrawn with a conditional branch that checks for certain conditions.