I followed the instructions and got the window to appear, with the text, but when trying to add the cancel at: "Lesson 3 - Adding Controls to your Scene"
it keeps giving me an error (SyntaxError) on line 46 in my " Scene_ShowWindow " when launching the game.
#==============================================================================
# * Scene_ShowWindow
#==============================================================================
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_Menu.new
return
end
end
Sorry for such a noobish problem, but help would be greatly appreciated.
Alright, so I know just shy of nothing about scripting, and so I'm trying to learn some stuff. I'm currently looking/working this tutorial:
CMS Tutorial
I followed the instructions and got the window to appear, with the text, but when trying to add the cancel at: "Lesson 3 - Adding Controls to your Scene"
it keeps giving me an error (SyntaxError) on line 46 in my " Scene_ShowWindow " when launching the game.
#============================================================================== # * Scene_ShowWindow #============================================================================== 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_Menu.new return end endSorry for such a noobish problem, but help would be greatly appreciated.
Share this post
Link to post
Share on other sites