Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

scripting question

hey im new to scripting and i was woundering if someone could check my (extremely noobish) code
Code:
#------------------------------------------------------------------------------#

                   #This is a test#

#------------------------------------------------------------------------------#

class MyCustomWindow < Window_Base 

  #---------------------------------------------------------------------------

  #  *object initialization

  #----------------------------------------------------------------------------

  def initialize

    super(0,0,640,480)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  

  def refresh

   self.contents.clear

   self.contents.font.color = normal_color

   self.contents.font.size = 20

   self.contents.draw_text(50, 50, 32, 32, "I am TEXT. Obey ME!!")

 end

 

end

class Scene_ShowWindow

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    #call the window

    @window = MyCustomWindow.new

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

     end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of windows

    @window.dispose

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  

 def update

    # Update windows

    @window.update

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to Menu screen

      $scene = Scene_Map.new

      return

    end

end
I keep getting an error on line 64.please tell me what im doin wrong.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top