Galv's Shop Upgrade 2.7 error

Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
I'm trying to use this script but I get an error:

Script 'Galv's_Shop_UPgrade 2.7' line 379:
NoMethodError occured

undefined method '[]' for nil:NilClass

This is an excerpt from the script:

376 alias galv_shopkeeper_scene_shop_prepare prepare
377 def prepare(goods, purchase_only)
378 galv_shopkeeper_scene_shop_prepare(goods, purchase_only)
379 return if $game_system.shop_stock[$game_system.shop_selected].nil?
380 stock_change

end

I don't really understand why I get this error.

I downloaded the demo and it works perfectly fine but it doesn't work in my game (I even tried copying and pasting the exact same event with the same pictures for testing but I get the same error).

The other scripts I have are (in this order):
Galv's Jump Ability
Modern Algebra's Quest Journal
TheoAllen's Fog of War
Yanfly's Parallax Block
V.M of D.T's Enemy HP bars 2.9
Galv's Shop Upgrade 2.8


Does anyone have any suggestions?
My scripting knowledge is very limited and I only studied some basics of python.
BTW, the script I'm using is 2.8 but the DEMO is 2.7 so I have already tried using 2.7 but I get the same error.
Check the spoiler for the full script!

My needs
:
I actually don't need the shopkeeper to change expression so I don't care about that.
I also don't care about the shop remembering how many items are sold (0 is for infinity) so I don't care about that option either.

To me what's important is the graphic so people can see a beautiful shop, its items and their effect on the party.

Thanks in advance!

Link to Galv's script https://galvs-scripts.com/galvs-shopkeeper-graphics/
 
Last edited:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
'Scripts' is where people who have written completed scripts that they want to share with others can post them.

[move]RGSSx Script Support[/move]
Galv's Terms of Use specifically state that his scripts must not be reposted. Please edit your post to remove the script and instead give a link to the web page where the script can be found.
Thanks.
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
You don't test freshly installed scripts with a loaded game.
Start a new game to test every time you install a new script just to be safe.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
'Scripts' is where people who have written completed scripts that they want to share with others can post them.

[move]RGSSx Script Support[/move]
Galv's Terms of Use specifically state that his scripts must not be reposted. Please edit your post to remove the script and instead give a link to the web page where the script can be found.
Thanks.
Kes, thank you for your help. It's my first time dealing with this kind of issue.
I'm now going to delete Galv's script and just put a link to his website. My apologies to Galv, I had no clue.

Sixth, I downloaded the demo and it works perfectly fine but I'll try what you said to see if there are any changes.
In the meantime, scriptwise, can anyone tell me what the error may be?

Thanks!
 

Sixth

Veteran
Veteran
Joined
Jul 4, 2014
Messages
2,162
Reaction score
822
First Language
Hungarian
Primarily Uses
RMVXA
It's missing a variable that is created only when you start a new game. Old savefiles will NOT have that variable, which nets the error you get.
Another possibility is a script incompatibility, which means that another custom script overwrites the initialize method in the Game_System class, but that is highly unlikely.

Ohh, and just to be clear about this...
Savefiles made after you installed Galv's script will work correctly when loaded. Only savefiles made prior to installing Galv's script will produce the error you get.
 
Joined
Sep 15, 2017
Messages
63
Reaction score
13
First Language
Telepathy
Primarily Uses
RMVXA
It's missing a variable that is created only when you start a new game. Old savefiles will NOT have that variable, which nets the error you get.
Another possibility is a script incompatibility, which means that another custom script overwrites the initialize method in the Game_System class, but that is highly unlikely.

Ohh, and just to be clear about this...
Savefiles made after you installed Galv's script will work correctly when loaded. Only savefiles made prior to installing Galv's script will produce the error you get.
It works!
You saved me. I kept testing it with the Continue option so it didn't cross my mind to start a new game.
Now I did it and it works perfectly fine.
You made me really happy!
Thanks again
 

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,867
Messages
1,017,061
Members
137,575
Latest member
akekaphol101
Top