My game is unplayable right now, because it crashes when I hit "save" in the menu. I think it's my script causing it, but I have no idea why.
Here's the error:
http://i162.photobucket.com/albums/t241 ... FError.png[/IMG]
And here's the script:
How can I fix this?
Thanks.
Here's the error:
http://i162.photobucket.com/albums/t241 ... FError.png[/IMG]
And here's the script:
Code:
class Window_Itachi_One < Window_Base
def initialize
@bitmap = RPG::Cache.windowskin("InfectionWindow.png")
super(0, 260, @bitmap.width, @bitmap.height) # 90 | 70
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = 'Arial'
self.contents.font.size = 24
self.contents.font.color = text_color(2)
@var = nil
refresh
end
def to_s
$game_variables[15].to_s
end
def refresh
self.contents.clear
@bitmap = RPG::Cache.windowskin("InfectionWindow.png")
self.contents.blt(0, 0, @bitmap, Rect.new(0, 0, @bitmap.width, @bitmap.height), 170)
self.contents.draw_text(18, 0, @bitmap.width, @bitmap.height, to_s + "%")
end
def update
return if @var == $game_variables[15]
@var = $game_variables[15]
refresh
end
end
class Scene_Map
alias_method :old_main, :main
alias_method :old_update, :update
def main
@window = Window_Itachi_One.new
old_main
@window.dispose
end
def update
@window.update
old_update
end
end
Thanks.