I have an event that's supposed to change depending on how much <item name>s the player has in his inventory and it's causing an error in one of the main scripts.
I'm getting it no matter what I set the item to, whether it's an RTP item or a custom one.
[spoiler=Error details]
The Error:
QuoteScript 'Game Interpreter' line 750: NoMethodError occurred.
undefined method '[]' for nil:NilClass
The line referenced:
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
actor = $game_actors[@parameters[1]] #THIS ONE
actor = $game_actors[@params[4]]The event command causing the error:
@>Control Variables: [0015: Milk Possessed] = [Milk] in Inventory[/spoiler]
[spoiler=Scripts I'm using that affect items]
Jet's Percentage of Damage Snippet
KGC's Equipment Effects
Modern Algebra's Skill Teaching Equipment & Items
Modern Algebra's Cursed Equipment
KGC's Restored Combat Functions[/spoiler]
Any help solving this will be hugely appreciated :)
Do you get the error when you try to store the variable, or when you try to pull it?
Storing it. I've tried an event that only has that one line in it, and it's giving me the same result D:
Replace that one line with "when 4". The error is actually a bug with the default scripts in VX. It should look like this:
when 3 # Item
value = $game_party.item_number($data_items[@params[4]])
when 4 # Actor
actor = $game_actors[@params[4]]