The RPG Maker Resource Kit

Other Game Creation => Program Troubleshooting => Topic started by: darkelementwars on May 11, 2007, 08:59:21 AM

Title: Window_Base error
Post by: darkelementwars on May 11, 2007, 08:59:21 AM
I get an error on line 316 of Window_Base

it says undefined method icon_name
Title: Re: Window_Base error
Post by: Falcon on May 11, 2007, 10:57:35 AM
Thank you for giving us all the information we need, like what scripts you use, what line 319 is. and where you got the error.
Title: Re: Window_Base error
Post by: Snailer on May 11, 2007, 05:38:40 PM
you need to delete the line thats it
Title: Re: Window_Base error
Post by: Irock on May 11, 2007, 05:40:58 PM
Lol, don't do what Snailer said.

Just give us the script in code.
Title: Re: Window_Base error
Post by: darkelementwars on May 12, 2007, 05:44:49 AM
sorry, it's

def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end

the     bitmap = RPG::Cache.icon(item.icon_name)    is the line that causes the error

the scripts I'm using:

Sthrattoff's Quest Log
Stormtonics CMS Metal Plate Edition
Tons of Addons
Catepillar Script
Letter by Letter Message System
Easy Level Up  Notifier, Easy Party Switcher

the error is caused at the end of battle

i just recently switched to Sthratoff's Quest Log from another Quest log system so i have a feeling it might have something to do with that but i dont see why
Title: Re: Window_Base error
Post by: SirJackRex on May 12, 2007, 07:42:18 AM
  bitmap = RPG::Cache.icon(item.icon_name)

Ok, I'm pretty sure of this, but I haven't read the script.

Where "item.icon.name" is, go into the Resource Database and replace the "item.name_icon" with the name of an icon. Find the name of the icon in the database.

Hope that works.

But I recommend reading the script inside in script thing in RMXP and look for the green text.
That's directions.