Limited Supplies Script

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
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
Error.png

This is how the setup looks inside the script itself
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?

 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,522
Reaction score
14,255
First Language
English
Primarily Uses
RMVXA

I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

 

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
Oh, I apologize for posting this in the wrong forum. Thank you for moving it though.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
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
 

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
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.
11f97f471c0e7070a1d348f9e28e3e49.png
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
5,592
Reaction score
6,522
First Language
Indonesian
Primarily Uses
RMVXA
And that example is for "item list", not "first var item"
Anyway, so I guess it's solved?
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
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.)
 

Khaz

Learning Game Maker
Veteran
Joined
Dec 11, 2012
Messages
44
Reaction score
6
First Language
Finnish
Primarily Uses
RMVXA
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. :thumbsup-right:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,575
Latest member
akekaphol101
Top