ok im having trouble with my script. whenever i try and start my game an error comes up and says superclass must be a Class (TrueClass Givin) does ne one know what this means and how to fix it? here is the script
can ne one help me?
class Password_Input < Window_NameInput < Window_Base
@@password = 'qwerty' #Input the password you want inbetween the ' '.
CHARACTER_TABLE =
[
"A", "B", "C", "D", "E",
"F", "G", "H", "I", "J",
"K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y",
"Z", " ", "1", "2", "3",
"4", "5", "6", "7", "8",
"9", "0", " ", "+", "-",
";", ":", "'", ",", ".",
"a", "b", "c", "d", "e",
"f", "g", "h", "i", "j",
"k", "l", "m", "n", "o",
"p", "q", "r", "s", "t",
"u", "v", "w", "x", "y",
"z", " ", "!", "@", "#",
"$", "%", "^", "&", "*",
"(", ")", " ", "[", "]",
"{", "}", "<", ">", "?",
]
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super()
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Name Input" window font
self.contents.font.size = $defaultfontsize
@index = 0
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# â— æ–‡å—ã®å–å¾—
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0..89
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE, 1)
end
self.contents.draw_text(225, 9 * 32, 64, 32, "Accept", 1)
end
#--------------------------------------------------------------------------
# ◠カーソルã®çŸ©å½¢æ›´æ–°
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソルä½ç½®ãŒ [決定] ã®å ´åˆ
if @index >= 90
self.cursor_rect.set(225, 9 * 32, 64, 32)
# カーソルä½ç½®ãŒ [決定] 以外ã®å ´åˆ
else
x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 28, 32)
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルä½ç½®ãŒ [決定] ã®å ´åˆ
if @index >= 90
# カーソル下
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index -= 90
end
# カーソル上
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@index -= 90 - 40
end
# カーソルä½ç½®ãŒ [決定] 以外ã®å ´åˆ
else
# æ–¹å‘ボタンã®å³ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::RIGHT)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒå³ç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::RIGHT) or
@index / 45 < 3 or @index % 5 < 4
# カーソルをå³ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 5 < 4
@index += 1
else
@index += 45 - 4
end
if @index >= 90
@index -= 90
end
end
end
# æ–¹å‘ボタンã®å·¦ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::LEFT)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒå·¦ç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::LEFT) or
@index / 45 > 0 or @index % 5 > 0
# カーソルを左ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 5 > 0
@index -= 1
else
@index -= 45 - 4
end
if @index < 0
@index += 90
end
end
end
# æ–¹å‘ボタンã®ä¸‹ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::DOWN)
# カーソルを下ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 45 < 40
@index += 5
else
@index += 90 - 40
end
end
# æ–¹å‘ボタンã®ä¸ŠãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::UP)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒä¸Šç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::UP) or @index % 45 >= 5
# カーソルを上ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 45 >= 5
@index -= 5
else
@index += 90
end
end
end
# L ボタン㋠R ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::L) or Input.repeat?(Input::R)
# ã²ã‚‰ãŒãª / カタカナ 移動
$game_system.se_play($data_system.cursor_se)
if @index / 45 < 2
@index += 90
else
@index -= 90
end
end
end
update_cursor_rect
end
def refresh
self.contents.clear
if @index != @@password
refresh_3
else
refresh_2
end
end
def refresh_2
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Thank you, the gate is now open.')
end
def refresh_3
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Im sorry but those credentials arent')
self.contents.draw_text(0, 25, 400, 32, 'valid, please come back and try again')
self.contents.draw_text(0, 50, 400, 32, 'in a moment when the screen refreshes.')
end
class Equation
def initialize
super(0, 308, 621, 150)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = 'Arial'
self.contents.font.size = 24
refresh
end
def refresh
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'You should think about what your doing!')
end
def refresh_2
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Im sorry but those credentials arent')
self.contents.draw_text(0, 25, 400, 32, 'valid, please come back and try again')
self.contents.draw_text(0, 50, 400, 32, 'in a moment when the screen refreshes.')
end
end
end
@@password = 'qwerty' #Input the password you want inbetween the ' '.
CHARACTER_TABLE =
[
"A", "B", "C", "D", "E",
"F", "G", "H", "I", "J",
"K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T",
"U", "V", "W", "X", "Y",
"Z", " ", "1", "2", "3",
"4", "5", "6", "7", "8",
"9", "0", " ", "+", "-",
";", ":", "'", ",", ".",
"a", "b", "c", "d", "e",
"f", "g", "h", "i", "j",
"k", "l", "m", "n", "o",
"p", "q", "r", "s", "t",
"u", "v", "w", "x", "y",
"z", " ", "!", "@", "#",
"$", "%", "^", "&", "*",
"(", ")", " ", "[", "]",
"{", "}", "<", ">", "?",
]
#--------------------------------------------------------------------------
# ◠オブジェクトåˆæœŸåŒ–
#--------------------------------------------------------------------------
def initialize
super()
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $defaultfonttype # "Name Input" window font
self.contents.font.size = $defaultfontsize
@index = 0
refresh
update_cursor_rect
end
#--------------------------------------------------------------------------
# â— æ–‡å—ã®å–å¾—
#--------------------------------------------------------------------------
def character
return CHARACTER_TABLE[@index]
end
#--------------------------------------------------------------------------
# ◠リフレッシュ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0..89
x = 4 + i / 5 / 9 * 152 + i % 5 * 28
y = i / 5 % 9 * 32
self.contents.draw_text(x, y, 28, 32, CHARACTER_TABLE, 1)
end
self.contents.draw_text(225, 9 * 32, 64, 32, "Accept", 1)
end
#--------------------------------------------------------------------------
# ◠カーソルã®çŸ©å½¢æ›´æ–°
#--------------------------------------------------------------------------
def update_cursor_rect
# カーソルä½ç½®ãŒ [決定] ã®å ´åˆ
if @index >= 90
self.cursor_rect.set(225, 9 * 32, 64, 32)
# カーソルä½ç½®ãŒ [決定] 以外ã®å ´åˆ
else
x = 4 + @index / 5 / 9 * 152 + @index % 5 * 28
y = @index / 5 % 9 * 32
self.cursor_rect.set(x, y, 28, 32)
end
end
#--------------------------------------------------------------------------
# ◠フレーム更新
#--------------------------------------------------------------------------
def update
super
# カーソルä½ç½®ãŒ [決定] ã®å ´åˆ
if @index >= 90
# カーソル下
if Input.trigger?(Input::DOWN)
$game_system.se_play($data_system.cursor_se)
@index -= 90
end
# カーソル上
if Input.repeat?(Input::UP)
$game_system.se_play($data_system.cursor_se)
@index -= 90 - 40
end
# カーソルä½ç½®ãŒ [決定] 以外ã®å ´åˆ
else
# æ–¹å‘ボタンã®å³ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::RIGHT)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒå³ç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::RIGHT) or
@index / 45 < 3 or @index % 5 < 4
# カーソルをå³ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 5 < 4
@index += 1
else
@index += 45 - 4
end
if @index >= 90
@index -= 90
end
end
end
# æ–¹å‘ボタンã®å·¦ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::LEFT)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒå·¦ç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::LEFT) or
@index / 45 > 0 or @index % 5 > 0
# カーソルを左ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 5 > 0
@index -= 1
else
@index -= 45 - 4
end
if @index < 0
@index += 90
end
end
end
# æ–¹å‘ボタンã®ä¸‹ãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::DOWN)
# カーソルを下ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 45 < 40
@index += 5
else
@index += 90 - 40
end
end
# æ–¹å‘ボタンã®ä¸ŠãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::UP)
# 押下状態ãŒãƒªãƒ”ートã§ãªã„å ´åˆã‹ã€
# カーソルä½ç½®ãŒä¸Šç«¯ã§ã¯ãªã„å ´åˆ
if Input.trigger?(Input::UP) or @index % 45 >= 5
# カーソルを上ã«ç§»å‹•
$game_system.se_play($data_system.cursor_se)
if @index % 45 >= 5
@index -= 5
else
@index += 90
end
end
end
# L ボタン㋠R ボタンãŒæŠ¼ã•ã‚ŒãŸå ´åˆ
if Input.repeat?(Input::L) or Input.repeat?(Input::R)
# ã²ã‚‰ãŒãª / カタカナ 移動
$game_system.se_play($data_system.cursor_se)
if @index / 45 < 2
@index += 90
else
@index -= 90
end
end
end
update_cursor_rect
end
def refresh
self.contents.clear
if @index != @@password
refresh_3
else
refresh_2
end
end
def refresh_2
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Thank you, the gate is now open.')
end
def refresh_3
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Im sorry but those credentials arent')
self.contents.draw_text(0, 25, 400, 32, 'valid, please come back and try again')
self.contents.draw_text(0, 50, 400, 32, 'in a moment when the screen refreshes.')
end
class Equation
def initialize
super(0, 308, 621, 150)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = 'Arial'
self.contents.font.size = 24
refresh
end
def refresh
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'You should think about what your doing!')
end
def refresh_2
self.contents.clear
self.contents.font.color = text_color(6)
self.contents.draw_text(0, 0, 400, 32, 'Im sorry but those credentials arent')
self.contents.draw_text(0, 25, 400, 32, 'valid, please come back and try again')
self.contents.draw_text(0, 50, 400, 32, 'in a moment when the screen refreshes.')
end
end
end
can ne one help me?