[RESOLVED] Yet another script error >.< BlizzABS regarding potions

Started by Mixxth, February 19, 2011, 12:46:50 am

Previous topic - Next topic

Mixxth

Hey I want to have a simple potion that heals a party member, but when I create it in the items screen add it to my inv then hotkey it to my hotbar and click "A" which I've allocated to be the *item use* button; a bubble pops up which I'm assuming is an AoE effect and I can click party members but the second I do i get this message;



In the script itself it takes me to BlizzABS Part 3 Line 581:
Spoiler: ShowHide
#----------------------------------------------------------------------------
 # 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      <--- Line 581
   end
   return $game_party.item_can_use?(id)
 end


I'm not sure whats going on so I checked both the manual and searched the forum; ultimately leading me to posting this >.<

I use scripts: BlizzABS 2.84 // Z-HUD and thats all I can think of that would effect it >.>
Donald Knuth: "I can't go to a restaurant and order food because I keep looking at the fonts on the menu. Five minutes later I realize that it's also talking about food."

ForeverZer0

Are you missing a section of script?
I know in the default scripts, that method is in the Game_Party class. I'm not sure if it was moved for BABS, but you can try adding changing the line so that it reads:
return $game_party.item_number(id) != 0


If someone else can say for sure if this method was moved for BABS, it would be most helpful. Otherwise I am not so sure of the wisdom in changing it where the method is being called from a class other than what it should be, which in this example appears to be in Game_Player.
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.

Mixxth

Quote from: ForeverZer0 on February 19, 2011, 01:06:33 am
Are you missing a section of script?
I know in the default scripts, that method is in the Game_Party class. I'm not sure if it was moved for BABS, but you can try adding changing the line so that it reads:
return $game_party.item_number(id) != 0


If someone else can say for sure if this method was moved for BABS, it would be most helpful. Otherwise I am not so sure of the wisdom in changing it where the method is being called from a class other than what it should be, which in this example appears to be in Game_Player.


ForeverZero your quickly becoming my favorite person in existence!
Donald Knuth: "I can't go to a restaurant and order food because I keep looking at the fonts on the menu. Five minutes later I realize that it's also talking about food."