Chaos Project

RPG Maker => RPG Maker Scripts => Script Troubleshooting => Topic started by: bigace on March 23, 2013, 04:12:44 pm

Title: [RESOLVED][RGSS] Finished, but having one small issue.
Post by: bigace on March 23, 2013, 04:12:44 pm
Okay so I was writing my banking system and it's pretty much done, but I've ran into one problem. My bank has two things: the ability to deposit or withdraw and to buy bonds. The deposit and withdraw part works, however when I try to set up a bond an use it I keep getting errors. I've tried everything I know, so I'm going to take a breather and hopfully someone else can figure out the issue.

[Link Removed]

The error appears when you click on "Purchase Bond" in the command window.
Title: Re: [RGSS] Finished, but having one small issue.
Post by: KK20 on March 23, 2013, 11:59:22 pm
Error occurs at...: ShowHide
QuoteSat Mar 23 21:51:11 Pacific Daylight Time 2013:
undefined method `name' for 1:Fixnum
Window_Bond:33:in `bond_header'
Window_Bond:17:in `refresh'
Scene_Bank:342:in `refresh_windows'
Scene_Bank:184:in `command_purchase'
Scene_Bank:164:in `view_command'
Scene_Bank:155:in `update_command_selection'
Scene_Bank:136:in `update'
Scene_Base v1.4:40:in `main'
Main:28

Main culprit (Line 180 in Scene_Bank):
@current_bond = @av_bond_command.method

To which I noticed Window_CommandBase#method returns an integer value:

class Window_CommandBase < Window_Selectable
...
  def method; return @data[self.index]; end
...
end
Title: Re: [RGSS] Finished, but having one small issue.
Post by: bigace on March 24, 2013, 02:05:02 am
So any suggestions on how to fix this as I've tried everything I know to fix this issue.

Nevermind I figured out the issue, now I jut got to figure out how to get them to appear in the other list.