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.
Errors with Mr.Mo's Scene & Window Wizard scripts...

0 Members and 1 Guest are viewing this topic.

*
Rep: +0/-0Level 83
I'm sure this counts as script help, as the problem is caused by scripts which are generated by a program. I'm using Mr.Mo's Scene and Window Wizard V2.0, to make an "About" window which will have a link to a website, update/patch page, etc, for my game. I've set it all up in the Title screen and all that but I just can't make my own windows without the thing hanging. So using this program, I set up the "About" page. I'll also be using it to create windows later.

I'll post all the scripts I'm using which were generated by this at the end.

My problems are ; first when I imported the scripts ("abtby", "abtmain", "abtweb" and "Scene_about2"), I got this error, can't remember exactly but it was something about "undefined" and it said "Game_Text". So I copied this script called "Game_Text" from the source of the Wizard (yes it's a program within an RMXP "game"), and tried again. I got a page showing the windows I had set up (correct), but no text.

Something like that, I can't remember exactly, but I ended up getting this error saying it didn't know what "add_text" meant. So I added this to the start of abyby, abtmain and abtweb :

Code: [Select]
   def add_text(text,x,y,w,h,size,color,b,i)
    self.contents.font.color = color
    self.contents.font.size = size
    self.contents.font.bold = b
    self.contents.font.italic = i
    self.contents.draw_text(x, y, w, h, text)
  end

So this got me SOMEWHERE. Now, instead of an error or no text showing up, I get text showing up. The formatting (size, colours, placement, etc) is all good. Only problem is, instead of saying the stuff I wrote in them, they say stuff like "text282178", etc. This is really pissing me off. I'm quite new to scripts. I'll give you all the scripts I have now, a bit messy but that's 'coz I've been trying everything I can think of to fix them...



Scene_about2:

Code: [Select]
#==============================================================================
# Scene_about2
#==============================================================================
class Scene_about2
  #--------------------------------------------------------------------------
  # * Main - Handles drawing/disposing windows and the main loop
  #--------------------------------------------------------------------------
  def main
    #Draw Windows
    main_draw
    #Execute transition
    Graphics.transition
    #Main Loop
    loop do
      #Main Loop
      main_loop
      break if main_scenechange?
    end
    #Prepare for transition
    Graphics.freeze
    #Dispose Windows
    main_dispose
  end
  #--------------------------------------------------------------------------
  # * Main Draw - Handles drawing windows
  #--------------------------------------------------------------------------
  def main_draw
    #Draw Windows
    # Abtmain
    @abtmain = Abtmain.new
    # Abtby
    @abtby = Abtby.new
    # Abtweb
    @abtweb = Abtweb.new
  end
  #--------------------------------------------------------------------------
  # * Main Scene Change
  #--------------------------------------------------------------------------
  def main_scenechange?
    # Abort loop if screen is changed
    if $scene != self
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Main Dispose
  #--------------------------------------------------------------------------
  def main_dispose
    # Dispose All Windows
    # Dispose Abtmain
    @abtmain.dispose
    # Dispose Abtby
    @abtby.dispose
    # Dispose Abtweb
    @abtweb.dispose
  end
  #--------------------------------------------------------------------------
  # * Main Loop
  #--------------------------------------------------------------------------
  def main_loop
    # Update game screen
    Graphics.update
    # Update input information
    Input.update
    # Frame update
    update
  end
  #--------------------------------------------------------------------------
  # * Update
  #--------------------------------------------------------------------------
  def update
    # Update Windows
    update_windows
  end
  #--------------------------------------------------------------------------
  # * Window Update
  #--------------------------------------------------------------------------
  def update_windows
    # Update Abtmain
    @abtmain.update if @abtmain.visible
    # Update Abtby
    @abtby.update if @abtby.visible
    # Update Abtweb
    @abtweb.update if @abtweb.visible
  end
end

Abtby:
Code: [Select]
#==============================================================================
# Abtby
#==============================================================================
class Abtby < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 640, 75)
    #Set Window Skin
    self.windowskin = RPG::Cache.windowskin('001-Blue01')
    #Create Bitmap
    self.contents = Bitmap.new(width - 32, height - 32)
    #Z-Pos
    self.z = 100
    #Get Contents
    get_contents
    #Refresh and add the contents to window
    refresh
  end
 
    def add_text(text,x,y,w,h,size,color,b,i)
    self.contents.font.color = color
    self.contents.font.size = size
    self.contents.font.bold = b
    self.contents.font.italic = i
    self.contents.draw_text(x, y, w, h, text)
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #Clear Bitmap
    self.contents.clear
    #Add Contents
    add_contents
  end
  #--------------------------------------------------------------------------
  # * Add Content- Adds the contents
  #--------------------------------------------------------------------------
  def add_contents
    #Get all the contents
    for cont in @content
      next if cont == nil
      #If the content is a text
      if cont.is_a?(Game_Text)
        # Add the text
        add_text(cont.text,cont.x,cont.y,cont.w,cont.h,cont.size,cont.color,cont.bol,cont.it)
      elsif cont.is_a?(Game_Bar)
        # Add Bar
        draw_bar_type(cont.x, cont.y, cont.min, cont.max, cont.file, cont.w , cont.h, cont.hue, cont.back, cont.back2, cont.view)
      elsif cont.is_a?(Game_HpBar)
        #Draw HP Bar
        draw_actor_hp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_SpBar)
        #Draw Sp Bar
        draw_actor_sp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ExpBar)
        #Draw Exp Bar
        draw_actor_exp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ParaBar)
        #Draw Para Bar
        draw_actor_parameter(cont.actor, cont.x, cont.y, cont.type, cont.file)
      elsif cont.is_a?(Game_Pic)
        #Draw Picture
        add_picture(cont.file,cont.x,cont.y,cont.w,cont.h)
      elsif cont.is_a?(Game_CharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_Bat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_AcCharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_AcBat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_Icon)
        #Draw Icon
        add_icon(cont.file,cont.x,cont.y,cont.w,cont.h)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get Contents - Creates a list of the contents
  #--------------------------------------------------------------------------
  def get_contents
    #Set the content array
    @content = []
    #Save Content: Text This game is brought to you by Leviathan Games...
    @content[0] = Game_Text.new(2,-8,640,32,'This game is brought to you by Leviathan Games...',16,true,false,255,255,255,255)
    #Save Content: Text LEVIATHAN GAMES
    @content[1] = Game_Text.new(416,17,640,32,'LEVIATHAN GAMES',23,false,false,255,0,0,255)
  end
end

Abtmain:

Code: [Select]
#==============================================================================
# Abtmain
#==============================================================================
class Abtmain < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 75, 640, 405)
    #Set Window Skin
    self.windowskin = RPG::Cache.windowskin('001-Blue01')
    #Create Bitmap
    self.contents = Bitmap.new(width - 32, height - 32)
    #Z-Pos
    self.z = 100
    #Get Contents
    get_contents
    #Refresh and add the contents to window
    refresh
  end
 
    def add_text(text,x,y,w,h,size,color,b,i)
    self.contents.font.color = color
    self.contents.font.size = size
    self.contents.font.bold = b
    self.contents.font.italic = i
    self.contents.draw_text(x, y, w, h, text)
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #Clear Bitmap
    self.contents.clear
    #Add Contents
    add_contents
  end
  #--------------------------------------------------------------------------
  # * Add Content- Adds the contents
  #--------------------------------------------------------------------------
  def add_contents
    #Get all the contents
    for cont in @content
      next if cont == nil
      #If the content is a text
      if cont.is_a?(Game_Text)
        # Add the text
        add_text(cont.text,cont.x,cont.y,cont.w,cont.h,cont.size,cont.color,cont.bol,cont.it)
      elsif cont.is_a?(Game_Bar)
        # Add Bar
        draw_bar_type(cont.x, cont.y, cont.min, cont.max, cont.file, cont.w , cont.h, cont.hue, cont.back, cont.back2, cont.view)
      elsif cont.is_a?(Game_HpBar)
        #Draw HP Bar
        draw_actor_hp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_SpBar)
        #Draw Sp Bar
        draw_actor_sp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ExpBar)
        #Draw Exp Bar
        draw_actor_exp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ParaBar)
        #Draw Para Bar
        draw_actor_parameter(cont.actor, cont.x, cont.y, cont.type, cont.file)
      elsif cont.is_a?(Game_Pic)
        #Draw Picture
        add_picture(cont.file,cont.x,cont.y,cont.w,cont.h)
      elsif cont.is_a?(Game_CharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_Bat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_AcCharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_AcBat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_Icon)
        #Draw Icon
        add_icon(cont.file,cont.x,cont.y,cont.w,cont.h)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get Contents - Creates a list of the contents
  #--------------------------------------------------------------------------
  def get_contents
    #Set the content array
    @content = []
    #Save Content: Text Paths - The Rising
    @content[0] = Game_Text.new(207,-4,640,32,'Paths - The Rising',28,false,false,255,255,255,100)
    #Save Content: Text This is the first official game created by Leviathan, a small team of people just making games for the lulz.
    @content[1] = Game_Text.new(2,25,630,35,'This is the first official game created by Leviathan, a small team of people just making games for the lulz.',16,false,false,255,255,255,255)
    #Save Content: Text There has been lots of inspirations for this game. Some of them will be listed here...
    @content[2] = Game_Text.new(2,44,640,32,'There has been lots of inspirations for this game. Some of them will be listed here...',16,false,false,255,255,255,255)
    #Save Content: Text Loot and Stats system = Loosely based on Final Fantasy 12
    @content[3] = Game_Text.new(23,74,640,32,'Loot and Stats system = Loosely based on Final Fantasy 12',21,false,false,255,255,255,255)
    #Save Content: Text Good/Evil system = Fable 2/Mass Effect
    @content[4] = Game_Text.new(23,100,640,32,'Good/Evil system = Fable 2/Mass Effect',21,false,false,255,255,255,255)
    #Save Content: Text Badass lines = Pinhead of Hellraiser
    @content[5] = Game_Text.new(23,125,640,32,'Badass lines = Pinhead of Hellraiser',21,false,false,255,255,255,255)
  end
end

Abtweb:

Code: [Select]
#==============================================================================
# Abtweb
#==============================================================================
class Abtweb < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 326, 639, 162)
    #Set Window Skin
    self.windowskin = RPG::Cache.windowskin('001-Blue01')
    #Create Bitmap
    self.contents = Bitmap.new(width - 32, height - 32)
    #Z-Pos
    self.z = 100
    #Get Contents
    get_contents
    #Refresh and add the contents to window
    refresh
  end
 
    def add_text(text,x,y,w,h,size,color,b,i)
    self.contents.font.color = color
    self.contents.font.size = size
    self.contents.font.bold = b
    self.contents.font.italic = i
    self.contents.draw_text(x, y, w, h, text)
  end
 
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    #Clear Bitmap
    self.contents.clear
    #Add Contents
    add_contents
  end
  #--------------------------------------------------------------------------
  # * Add Content- Adds the contents
  #--------------------------------------------------------------------------
  def add_contents
    #Get all the contents
    for cont in @content
      next if cont == nil
      #If the content is a text
      if cont.is_a?(Game_Text)
        # Add the text
        add_text(cont.text,cont.x,cont.y,cont.w,cont.h,cont.size,cont.color,cont.bol,cont.it)
      elsif cont.is_a?(Game_Bar)
        # Add Bar
        draw_bar_type(cont.x, cont.y, cont.min, cont.max, cont.file, cont.w , cont.h, cont.hue, cont.back, cont.back2, cont.view)
      elsif cont.is_a?(Game_HpBar)
        #Draw HP Bar
        draw_actor_hp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_SpBar)
        #Draw Sp Bar
        draw_actor_sp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ExpBar)
        #Draw Exp Bar
        draw_actor_exp(cont.actor, cont.x, cont.y, cont.w, cont.file)
      elsif cont.is_a?(Game_ParaBar)
        #Draw Para Bar
        draw_actor_parameter(cont.actor, cont.x, cont.y, cont.type, cont.file)
      elsif cont.is_a?(Game_Pic)
        #Draw Picture
        add_picture(cont.file,cont.x,cont.y,cont.w,cont.h)
      elsif cont.is_a?(Game_CharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_Bat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_AcCharacterSet)
        #Draw Characterset
        add_characterset(cont.file,cont.x,cont.y,cont.dir,cont.h,cont.w,cont.hue)
      elsif cont.is_a?(Game_AcBat)
        #Draw Game Battler
        add_battler(cont.file,cont.x,cont.y,cont.w,cont.h,cont.hue)
      elsif cont.is_a?(Game_Icon)
        #Draw Icon
        add_icon(cont.file,cont.x,cont.y,cont.w,cont.h)
      end
    end
  end
  #--------------------------------------------------------------------------
  # * Get Contents - Creates a list of the contents
  #--------------------------------------------------------------------------
  def get_contents
    #Set the content array
    @content = []
    #Save Content: Text
    @content[0] = Game_Text.new(21,7,100,32,'',21,false,false,255,255,255,255)
    #Save Content: Text Website and updates page will be added here late on. To be continued...
    @content[1] = Game_Text.new(8,-3,640,32,'Website and updates page will be added here late on. To be continued...',21,false,false,0,255,0,255)
  end
end


This might not make much sense, but try to make sense of it. I'm tired right now as it's 3:22 AM, and I've been trying to make this "About" window since about 6 PM. I could just leave it, but if I can't make this window, I can't make any. So I want to get it working so I atleast know how to do it.

Thanks for any help.
« Last Edit: August 10, 2009, 02:28:43 AM by OverNineThousand »