• 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.

[Scripting Question] Help "cannot convert string into Integer"

  • 3
    Posts
    8
    Years
    • Seen Apr 25, 2017
    Whenever I start up the game I see this message. I have no idea how to fix it and this is all it's telling me.

    ---------------------------
    Pokemon Onyx
    ---------------------------
    Exception: TypeError

    Message: cannot convert String into Integer

    Intl_Messages:490:in `[]='

    Intl_Messages:490:in `addToHash'

    Intl_Messages:487:in `each'

    Intl_Messages:487:in `addToHash'

    Intl_Messages:515:in `addMessagesAsHash'

    Intl_Messages:654:in `addMessagesAsHash'

    Intl_Messages:36:in `pbSetTextMessages'

    Compiler:4135:in `pbCompileAllData'

    Compiler:4219
     
    Last edited by a moderator:
    Whenever I start up the game I see this message. I have no idea how to fix it and this is all it's telling me.

    ---------------------------
    Pokemon Onyx
    ---------------------------
    Exception: TypeError
    Message: cannot convert String into Integer
    Intl_Messages:490:in `[]='
    Intl_Messages:490:in `addToHash'
    Intl_Messages:487:in `each'
    Intl_Messages:487:in `addToHash'
    Intl_Messages:515:in `addMessagesAsHash'
    Intl_Messages:654:in `addMessagesAsHash'
    Intl_Messages:36:in `pbSetTextMessages'
    Compiler:4135:in `pbCompileAllData'
    Compiler:4219

    We want information. And this is not general coding, but Essentials related.
     
    I have version 16.2. I just have the offline wonder trade added to my game. I recently created a new trainer but I made one before that and the game was working fine then. Other than that I didn't do much else to my version
     
    Looks like you're trying to add a string to a list that's meant to contain integers.
    We need more context to help you. Did you recently add a new script?

    Dunno if this is helpful or not but you can cast a string into an int in Ruby using .to_i (assuming that your string is something like "5" and doesn't have any letters in it)
     
    Looks like you're trying to add a string to a list that's meant to contain integers.
    We need more context to help you. Did you recently add a new script?

    Dunno if this is helpful or not but you can cast a string into an int in Ruby using .to_i (assuming that your string is something like "5" and doesn't have any letters in it)

    You're very right on that. It's just that those errors are typically to do with things like old save files, new scripts, etc. But we do indeed need more information to say that.
     
    Back
    Top