Blizz-ABS - Crash when Using an item... ((Like a potion))

Started by izlude1984, March 25, 2011, 02:11:27 am

Previous topic - Next topic

izlude1984

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?

Blizzard

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.
Check out our game brands:

Daygames
Game Night Games
Chugnar Games

Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

izlude1984

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

ForeverZer0

I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

izlude1984

Awesome, I see what you meant now, I needed to add that onto the item name portion. Its working now. Thanks a bunch!