RPG Maker Forums

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/

Latest Threads

Latest Posts

Latest Profile Posts

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.

Forum statistics

Threads
106,035
Messages
1,018,456
Members
137,821
Latest member
Capterson
Top