"NoMethodError"

Hello! So, I'm trying to add a crafting system to my game, so I'm using Daimonious Tails's "Basic Recipe Crafting".

The game will crash and show the error:
"Script 'Crafting' line 286: NoMethodError occured

undefined method 'values' for nil:NilClass"

appears when you attempt to open the menu. I have no clue on how any scripting works, and any help is appreciated!!
I've tried to look at other posts about this script, but none mention this error.

All the scripts I have are:

- Yanfly Engine Ace - Ace Equip Engine v1.06
- Yanfly Engine Ace - Skill Restrictions v1.02
- Map Effects v1.4.1 by Zeus81
- Yanfly Engine Ace - System Options v1.00
- Yanfly Engine Ace - Target Manager v1.03
- Enemy Gold / Item Bag - Roninator2
- Yanfly Engine Ace - Skill Cost Manager v1.03
- Encounter Conditions by Hime
- Monster Catalogue by Modern Algebra
- Script-That-Makes-The-Monster-Catalogue-Available-After-An-Event's-Turned-On by Roninator2
- Large Choice by Hime

and then finally of course the Basic Recipe Crafting by Daimonious Tail, and LINK TO THE SCRIPT will take you to the page for said script. Again, any help is appreciated ^_^
the key to this error is the "undefined for NIL"

it basically says that the parent object to "values" does not exist.

the four most common causes for this kind of error are:

1) trying to continue an incompatible savegame
if you add a script that stores its own data into savefiles, all previous savefiles become incompatible and you have to start a new game on the title screen to create the missing data objects.

2) missing script or wrong order of scripts
each script can only know and use functions that have been defined above it. and there are quite a number of scripts that require other scripts above them to function correctly

3) wrong configuration of scripts
a lot of scripts need to be configured for your game before they can be used. For example if a crafting script has no recipes, or a default recipe uses items that do not yet exist in your game, then the configuration points to non-existent data objects and those errors happen as well.

4) incompatible scripts
not every script can work together with every other script, sometimes a compatibility patch needs to be written. But that is a lot more difficult and you first need a backtracer to find the two conflicting scripts.


There are a number of other possible causes, but those are much rarer than the four mentioned above. And I don't know the crafting script you're using. But I suggest checking those first.

If that doesn't help, follow the link "how to use a script" in my signature to the bughunting section and install the backtracker script described there, it will give a better error trace to find the cause of the incompatibility.
the key to this error is the "undefined for NIL"

it basically says that the parent object to "values" does not exist.

the four most common causes for this kind of error are:

1) trying to continue an incompatible savegame
if you add a script that stores its own data into savefiles, all previous savefiles become incompatible and you have to start a new game on the title screen to create the missing data objects.

2) missing script or wrong order of scripts
each script can only know and use functions that have been defined above it. and there are quite a number of scripts that require other scripts above them to function correctly

3) wrong configuration of scripts
a lot of scripts need to be configured for your game before they can be used. For example if a crafting script has no recipes, or a default recipe uses items that do not yet exist in your game, then the configuration points to non-existent data objects and those errors happen as well.

4) incompatible scripts
not every script can work together with every other script, sometimes a compatibility patch needs to be written. But that is a lot more difficult and you first need a backtracer to find the two conflicting scripts.


There are a number of other possible causes, but those are much rarer than the four mentioned above. And I don't know the crafting script you're using. But I suggest checking those first.

If that doesn't help, follow the link "how to use a script" in my signature to the bughunting section and install the backtracker script described there, it will give a better error trace to find the cause of the incompatibility.

Thanks a ton! Turns out the issue was the first thing thing you mentioned about incompatible save data!!! Thank you very much ^_^ I'll keep in mind the rest of these too for future errors I can't figure out.

Original thread: https://forums.rpgmakerweb.com/threads/nomethoderror.173565/