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.

NameError occured while running script.

Tuna

Awesome Bro

I'm going through an RGSS tutorial and am currently on a part about windows. Here's the code for the script that I copied:

Code:
class My_Window < Window_Base

 

  def initialize

    super(0, 0, 200, 200)

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

    self.contents.font.name = "Arial"

    self.contents.font.size = 24

    self.contents.draw_text(0, 0, 200, 32, "Yay, some text!")

  end

  

end

which I am calling with

Code:
My_Window.new

Unfortunately I am getting the following error when I call the script and I can't see why. Can anyone help?

NameError occured while running script.

uninitialized constant Interpreter::My_Window
 

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