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.

Window Script not working.

Can anyone tell me why the following script isnt working?

class Window_Intro < Window
def initialize
super(0, 0, 200, 200)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
end

I've tried removing elements of it which I'm unsure of, like self.opacity, but it just never works. I keep getting the error message: "Script 'Window_Intro' line 3: ArgumentError occurred. wrong # of arguments (1 for 4)".

The line with super(0, 0, 200, 200) is copied straight out of a damn tutorial! I can't see how there is only 1 argument there instead of 4?
 
Aqueous;293384 said:
Ok thanks lemme try it ^^ - if thats the case btw why the hell doesn't it say the error is in line 1? Stupid debuggers :(

Because the error is indeed in line 3. Window class doens't have 4 initialization parameters. You should use Window_Base
 

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