I am using Deriru's/Dairu's Simple Item Storage in order to create a second option, "Vault system", at a bank. Here's how it works.
You approach the counter and the lady greets you, asking what you wish to do. Either 1)take out a loan, 2)use vault system or 3)hear banking explanation. If you choose two, she will then ask you how would you like to use the vault system. Either place or remove items from vault, or you can choose to purchase more storage space. If you choose to purchase more space, she then explains to you how much each space will cost depending upon your bank rating which is stored in a variable. (the higher it is, the less the spaces cost). Then she asks you how many spaces you wish to purchase. Immediately, the "number input" opens with two digits and is linked to a variable we'll call "X". Once the number is entered, X becomes that number, and if you can afford it and there are a still that many spaces available (the max is 30) the bank lady grants your request and you are given X amount of extra storage spaces.
That sounds like it would be simple. And really, it should be. I have the formula all worked out. However, I can't get the "Simple Item Storage" script to wok properly.
There is a call script command for adding new storage space. This command basically just opens the TOTAL amount of spaces that will be available. In other words, you can't just say add X amount of spaces. Instead, you have to add the X with the amount of spaces open before the transaction (a variable we'll call "Y") to get the new total amount (which we'll call "Z"). Then we have to place that number into the command:
$game_system.unlock_storages(amount)
So, the script is asking for an integar in the "amount" position. Something I can't really give, because in my project, that integar can be a number of different values. For example, if I have 7 currently available (y=7), and I purchase 4 (x=4), then that makes z=11, which will not always be the case.
Earlier today I tried this:
$game_system.unlock_storages($game_variable(74))
But that didn't work. It returned an argument error. 0 for 1, or something to that effect. I'm really just unsure as to how to use the correct syntax when calling variables with a script. Was the way I wrote it correct? Maybe not.
If someone could help, I'd greatly appreciate it.