Black4Wolf
Member
Hello, I keep getting this error
Script 'Window Help HUD' line 91:RGSSErroe Occured
disposed window
this is tthe script I put in:
#==============================================================================
# ** Window_Help HUD By Mac
#==============================================================================
class Window_Help2 < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-15, 300, 300, 180)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
@HUD_graphic = Sprite.new
@HUD_graphic.x = self.x + 10
@HUD_graphic.z = self.z + 1
@face_graphic = Sprite.new
@face_graphic.x = self.x + 10
@face_graphic.z = self.z + 2
end
#--------------------------------------------------------------------------
# * Set Text
# text : text string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 1)
# If at least one part of text and alignment differ from last time
if text != @text or align != @align
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# * Set Actor
# actor : status displaying actor
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 120, -1)
draw_actor_state(actor, 180, -1)
draw_actor_hp(actor, 120, 55)
draw_actor_sp(actor, 120, 69)
draw_actor_level(actor, 121, 41)
draw_actor_class(actor, 120, 25)
draw_actor_parameter(actor, 120, 83, 0)
draw_actor_parameter(actor, 200, 83, 1)
draw_actor_parameter(actor, 120, 97, 2)
draw_actor_parameter(actor, 200, 97, 6)
draw_actor_parameter(actor, 120, 111, 4)
draw_actor_parameter(actor, 200, 111, 5)
@HUD_graphic.bitmap = RPG::Cache.picture('Battle Help')
@HUD_graphic.y = 480 - @HUD_graphic.bitmap.height
@HUD_graphic.visible = true
@face_graphic.bitmap = RPG::Cache.picture(actor.name)
@face_graphic.y = 480 - @face_graphic.bitmap.height
@face_graphic.visible = true
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# * Set Enemy
# enemy : name and status displaying enemy
#--------------------------------------------------------------------------
def set_enemy(enemy)
@face_graphic.visible = false
@HUD_graphic.visible = false
text = enemy.name
state_text = make_battler_state_text(enemy, 12, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
def visible=(bool)
@face_graphic.visible = bool
@HUD_graphic.visible = bool
super(bool)
end
def dispose
# Dispose if window contents bit map is set
if self.contents != nil
self.contents.dispose
end
@face_graphic.dispose
@HUD_graphic.dispose
super
end
end
Please help
Script 'Window Help HUD' line 91:RGSSErroe Occured
disposed window
this is tthe script I put in:
#==============================================================================
# ** Window_Help HUD By Mac
#==============================================================================
class Window_Help2 < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(-15, 300, 300, 180)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
@HUD_graphic = Sprite.new
@HUD_graphic.x = self.x + 10
@HUD_graphic.z = self.z + 1
@face_graphic = Sprite.new
@face_graphic.x = self.x + 10
@face_graphic.z = self.z + 2
end
#--------------------------------------------------------------------------
# * Set Text
# text : text string displayed in window
# align : alignment (0..flush left, 1..center, 2..flush right)
#--------------------------------------------------------------------------
def set_text(text, align = 1)
# If at least one part of text and alignment differ from last time
if text != @text or align != @align
# Redraw text
self.contents.clear
self.contents.font.color = normal_color
self.contents.draw_text(4, 0, self.width - 40, 32, text, align)
@text = text
@align = align
@actor = nil
end
self.visible = true
end
#--------------------------------------------------------------------------
# * Set Actor
# actor : status displaying actor
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 120, -1)
draw_actor_state(actor, 180, -1)
draw_actor_hp(actor, 120, 55)
draw_actor_sp(actor, 120, 69)
draw_actor_level(actor, 121, 41)
draw_actor_class(actor, 120, 25)
draw_actor_parameter(actor, 120, 83, 0)
draw_actor_parameter(actor, 200, 83, 1)
draw_actor_parameter(actor, 120, 97, 2)
draw_actor_parameter(actor, 200, 97, 6)
draw_actor_parameter(actor, 120, 111, 4)
draw_actor_parameter(actor, 200, 111, 5)
@HUD_graphic.bitmap = RPG::Cache.picture('Battle Help')
@HUD_graphic.y = 480 - @HUD_graphic.bitmap.height
@HUD_graphic.visible = true
@face_graphic.bitmap = RPG::Cache.picture(actor.name)
@face_graphic.y = 480 - @face_graphic.bitmap.height
@face_graphic.visible = true
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# * Set Enemy
# enemy : name and status displaying enemy
#--------------------------------------------------------------------------
def set_enemy(enemy)
@face_graphic.visible = false
@HUD_graphic.visible = false
text = enemy.name
state_text = make_battler_state_text(enemy, 12, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
def visible=(bool)
@face_graphic.visible = bool
@HUD_graphic.visible = bool
super(bool)
end
def dispose
# Dispose if window contents bit map is set
if self.contents != nil
self.contents.dispose
end
@face_graphic.dispose
@HUD_graphic.dispose
super
end
end
Please help