• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Scottie, Todd, Serena, Kris - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

How to put a language option in the Options menu screen?

COMBOY

Pokémon Crimson & Navy
  • 72
    Posts
    14
    Years
    I want to add a language select option into the Options screen, but I don't get how to make it work without crashing the game.

    This is what I've wrote in the PokemonOptions screen, on the lowest part of the options commands:

    Code:
           EnumOption.new(_INTL("LANGUAGE"),[_INTL("ENG"),_INTL("ESP")],
              proc { $PokemonSystem.language },
              proc {|value|
              if LANGUAGES.length>=2
                 if !havedata
                   $PokemonSystem.language=pbChooseLanguage
                   end
                 pbLoadMessages("Data/"+LANGUAGES[pokemonSystem.language][1])
              end
              }
           )

    The problem is that anytime I try to change the language, the game crashes!
    I need help with this because I didn't like the language option to be in the main menu (Continue; New Game; Option; Language [it appears if in the project are two or more]).
     
    What is 'havedata'? Anyway, in my game, the below code is working:

    Code:
    EnumOption2.new(_INTL("LANGUAGE"),[LANGUAGES[0][0],LANGUAGES[1][0]],
      proc { $PokemonSystem.language },
      proc {|value| 
        $PokemonSystem.language=value
        pbLoadMessages("Data/"+LANGUAGES[$PokemonSystem.language][1]) 
      }
    )


    Sorry for my late response. Your code worked perfectly! Thank you!
     
    Last edited:
    Back
    Top