Limited Supplies Script

Hey.
I'm using Wavelength's Limited Supplies Script and whenever I try and open up the shop in-game, I get an error like this
Spoiler
Error.png

This is how the setup looks inside the script itself
Spoiler
Script.png

The items listed are just an HP Potion, MP Potion, Ally resurrect item (Like Phoenix Down), a Quest Item and Antidote.

To my knowledge - if I understood the script instructions correctly - the amount of variables between one items set variable and the next items set variables determines its stock.
So for example item ID 1 in this is set to variable 301 and the next item ID (4) is set to variable 311, which I understood would mean that there would be 10 potions in stock ( variables 301, 302, 303... 310 ) and the last item ( ID 6 ) would currently have just 1 of it in stock as there is no item coming after it.

Am I understanding this wrong or doing something wrong?

Spoiler: Link to the script

I've moved this thread to RGSSx Script Support. Thank you.

Oh, I apologize for posting this in the wrong forum. Thank you for moving it though.
I don't have time to understand the entire script and what it does. But your error comes from the setup
"First_var_item". You can't put multiple number there like 1,2,3,4 (It's array in Ruby terms)
So, what you need to do is just put a single number
I removed the other numbers and variables from them and it worked, but the thing is that in the instruction example, it seperates any additional item IDs with commas.
Spoiler: Like so
11f97f471c0e7070a1d348f9e28e3e49.png
And that example is for "item list", not "first var item"
Anyway, so I guess it's solved?
The setting First_var_item determines the first variable used to store the stock of the first item you added in the Limited_item_list setting.
The stock for the rest of the items will be stored in the variables after that one.
For example, with these settings:
Code:
Limited_item_list = [1, 4, 5, 7, 99, 134]
First_var_item = 311
The first item's (Item 1) stock is stored in Variable 311.
The second item's (Item 4) stock is stored in Variable 312.
The third item's (Item 5) stock is stored in Variable 313.
And so on.

I never used this script, but this is how I understood the instructions provided in the script.
(I didn't even check any code from it, btw, so if this is not how it works, than I misunderstood the instructions.)
Ah! That helped me understand it. Well, both of you did actually. You're right, TheoAllen; the example is only for the item list and not for the First_var_item.
It seems you're only meant to have the starting number from which the variables count onwards until they hit First_var_weapons variable ( being 401 in this case ) and the stock is what I can just set with a quick autorun event that sets the appropriate items variable to the number you set, so exactly as Sixth wrote.

Thank you both for clearing my moment of stupid. It is certainly solved now. 👍

Original thread: https://forums.rpgmakerweb.com/threads/limited-supplies-script.92528/