Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
  • 0
09youngw

Crashing Because of Script?

Question

I am using the Ring Menu, and for my hero's Status, I have a popup window (with the game still in background). When I exit this and then exit the ring menu and attempt to resume the game, it crashes.

 

I've found the problem, it being the map background (@spriteset = Spriteset_Map.new - removing this, causing a black background instead, fixes the problem).

 

I know on scenes you need @spriteset.dispose, or something, to update it or refresh it or something......

 

But trying to put this into the script for the Status window caused nothing to change, maybe I'm putting it in the wrong place or using a wrong command altogether, I don't know.

 

I hope I've explained this well enough... I don't really have a clue how to script as you can probably tell, I know this is probably so simple.

 

Help will be much appreciated :alright:

 

 

 

#==============================================================================
# ■ Window_Status
# by Reno-s--Joker
#==============================================================================
#  This window displays full status specs on the status screen.
#==============================================================================
class Window_Status < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(80, 70, 480, 320)
   self.contents = Bitmap.new(width - 32, height - 32)
   @spriteset = Spriteset_Map.new
   @actor = actor
   refresh 
 end
 #--------------------------------------------------------------------------
 # ● Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   # Actor's name
   self.contents.font.size = 32
   draw_actor_name(@actor, 0, 0)
   self.contents.font.size = 20
   # Main stats section
   draw_actor_hp(@actor, 0, 82, 172)
   draw_actor_sp(@actor, 0, 106, 172)
   # Actor parameter section
   draw_actor_parameter(@actor, 0, 150, 0)
   draw_actor_parameter(@actor, 0, 175, 1)
   draw_actor_parameter(@actor, 0, 200, 2)
   # Equipment Section
   self.contents.font.color = normal_color
   self.contents.draw_text(280, 80, 88, 32, $game_party.gold.to_s)
   self.contents.font.color = system_color
   self.contents.draw_text(240, 80, 88, 32, $data_system.words.gold)
   self.contents.draw_text(240, 120, 88, 32, "Equipment:")
   draw_item_name($data_weapons[@actor.weapon_id], 240, 148)
   draw_item_name($data_armors[@actor.armor1_id], 240, 172)
   draw_item_name($data_armors[@actor.armor2_id], 240, 196)
   draw_item_name($data_armors[@actor.armor3_id], 240, 220)
   draw_item_name($data_armors[@actor.armor4_id], 240, 246)
 end
 #--------------------------------------------------------------------------
 # ● Defines the drawing processes
 #--------------------------------------------------------------------------
 def draw_actor_picture(actor, x, y)
   bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
   x2 = bitmap.width
   y2 = bitmap.height
   x3 = x2 / 2
   src_rect = Rect.new(0, 0, x2, y2)
   self.contents.blt(x - x3, y - y2, bitmap, src_rect)
 end
 def draw_actor_name(actor, x, y)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 448, 32, actor.name, 1)
 end
 def draw_actor_class(actor, x, y)
   self.contents.font.color = system_color
   self.contents.draw_text(x, y, 448, 32, actor.class_name, 1)
 end
 #--------------------------------------------------------------------------
 # ● Other stuff which needs to be there although I dunno why... XD
 #--------------------------------------------------------------------------
 def update_actor(actor)
   @actor = actor
   refresh
 end
 def dummy
   self.contents.font.color = system_color
   self.contents.draw_text(320, 112, 96, 32, $data_system.words.weapon)
   self.contents.draw_text(320, 176, 96, 32, $data_system.words.armor1)
   self.contents.draw_text(320, 240, 96, 32, $data_system.words.armor2)
   self.contents.draw_text(320, 304, 96, 32, $data_system.words.armor3)
   self.contents.draw_text(320, 368, 96, 32, $data_system.words.armor4)
   draw_item_name($data_weapons[@actor.weapon_id], 320 + 24, 144)
   draw_item_name($data_armors[@actor.armor1_id], 320 + 24, 208)
   draw_item_name($data_armors[@actor.armor2_id], 320 + 24, 272)
   draw_item_name($data_armors[@actor.armor3_id], 320 + 24, 336)
   draw_item_name($data_armors[@actor.armor4_id], 320 + 24, 400)
 end
end

#==============================================================================
# ■ End Window_Status
#==============================================================================

 

 

Edited by Kiriashi

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

What likely is going on is a method wasnt aliased, Rearrange them, that might fix it.

Sorry, I don't know what that means?

 

Basically I think the problem is going from a scene with '@spriteset = Spriteset_Map.new', to a window with '@spriteset = Spriteset_Map.new', back to the scene with @spriteset = Spriteset_Map.new then back into the game. it has a problem with going back into the game. :/

Works fine without these.

Edited by 09youngw

Share this post


Link to post
Share on other sites
  • 0

I wish I could help with the script problem, but I did help you with yer' spoilers.

 

There is no name or id in the BBC.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...