Main Menu
  • Welcome to The RPG Maker Resource Kit.

Disposed Window Error? Help Please

Started by ado, March 28, 2006, 06:03:40 AM

0 Members and 1 Guest are viewing this topic.

ado

Hello. I made my own script (from parts from others) and when i try to do @command2_window.dispose i get an error message - "Disposed Window"  and it points to the Window_Base class?

Any ideas how to fix it?
Here is my script anyway:

----------------------------------------------------------------------------
#==============================================================================
# ? Scene_Title
#------------------------------------------------------------------------------
# ???????????????????
#==============================================================================

class Gear
 #--------------------------------------------------------------------------
 # ? ?????
 #--------------------------------------------------------------------------
 def initialize
   main
 end  
 
 def main


   s1 = "Equip Fishing Gear"
   s2 = "Crafting Screen"
   s3 = "Travel"
   s4 = "Teleport"

 
   @command2_window = Window_Command.new(192, [s1, s2, s3, s4])
   @command2_window.back_opacity = 160
   @command2_window.x = 320 - @command2_window.width / 2
   @command2_window.y = 288
   @command2_window.active = true
   loop do
     # ????????
     Graphics.update
     # ???????
     Input.update
     # ??????
     update
     # ????????????????

   end
   # ?????????

   # ?????????????
 end
 #--------------------------------------------------------------------------
 # ? ??????
 #--------------------------------------------------------------------------
 def update
   # ????????????
   @command2_window.update
   # C ??????????
   if Input.trigger?(Input::C)
     # ???????????????????
     case @command2_window.index
     when 0  # ??????
       @command2_window.dispose
     $scene = Scene_FishEquip.new
     when 1  # ???????

     when 2  # ???????

     when 3  # ???????
     
     end
   end
   

 end
 


end

Blizzard

Try this

The "@command2_window.dispose" comes after the "loop do" Instead of using it in the def update place the $scene = Scene_(something).new.

You see, the loop will break if the scene is changing, so to let the window dispose after you
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.



Get DropBox, the best free file syncing service there is!

ado

Thanks man i'll give it a go! I appreciate the help.  :wink:

ado

Sorry man but I still cant get this to work. I copied you script but I still got the error?