RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Disposed Window Error? Help Please

0 Members and 1 Guest are viewing this topic.

pokeball adoOffline
**
Rep: +0/-0Level 88
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

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
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!

pokeball adoOffline
**
Rep: +0/-0Level 88
Thanks man i'll give it a go! I appreciate the help.  :wink:

pokeball adoOffline
**
Rep: +0/-0Level 88
Sorry man but I still cant get this to work. I copied you script but I still got the error?