The RPG Maker Resource Kit
RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: ado on March 28, 2006, 06:03:40 AM
-
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
-
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
-
Thanks man i'll give it a go! I appreciate the help. :wink:
-
Sorry man but I still cant get this to work. I copied you script but I still got the error?