I've been getting this error when I use a potion via the hotkey system (instead of going into the menu and using it manually) which immediately crashes my game. :(
Script 'Blizz-ABS Script 2.84 Part 3' line 581: NoMethodError occurred.
undefined method 'item_number' for #<Game_Player:0x3a6d9c8>
Any idea what I can do to fix this?
Somebody posted the same problem the other day, it's s typing mistake. That line should say "$game_party.item_number", not "$game_player.item_number". You can fix it yourself.
Hmm, I don't know what I am seeing wrong but it looks like the script itself says what you said it should...
#----------------------------------------------------------------------------
# item_can_use?
# id - item ID
# forced - whether this is a forced action
# Determines whether an item can be used, serves for extendable purposes.
#----------------------------------------------------------------------------
def item_can_use?(id, forced = false)
if (forced)
# Unusable If item quantity is 0
return item_number(id) != 0
end
return $game_party.item_can_use?(id)
end
That is lines 572 through 584 in Blizz-ABS Script 2.84 Part 3
Blizz-ABS Script 2.84 Part 3 line 581
Check there.
Awesome, I see what you meant now, I needed to add that onto the item name portion. Its working now. Thanks a bunch!