• 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.
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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!
  • 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] How to make a working add-on for Luka S.J's EBS?

  • 72
    Posts
    6
    Years
    • Seen Jan 24, 2021
    Hello, all. I'm trying to make an add-on for Luka S.J's Elite Battle System, but I'm having trouble doing so. My changes conflict with the EBS, and I'm not really sure what I should do to remedy it. Can someone point me in the right direction? Thank you for any help in advance.

    What does this error mean?

    Code:
    [Pokémon Essentials version 17.2]
    Exception: RuntimeError
    Message: Script error within event 32 (coords 21,9), map 9 (Cold Forest):
    Exception: NoMethodError
    Message: EliteBattle_Addon:2044:in `pbShowWindow'undefined method `visible=' for nil:NilClass
    ***Full script:
    pbBossWildBattle(:MEW,20,1)
    
    Interpreter:243:in `pbExecuteScript'
    EliteBattle_Addon:2078:in `pbDisplayMessage'
    EliteBattle_Addon:230:in `pbDisplayBrief'
    EliteBattle_Addon:71:in `pbStartBattleCore'
    PokeBattle_Battle:2394:in `pbStartBattle'
    PField_Battles:446:in `pbBossWildBattle'
    PField_Battles:445:in `pbSceneStandby'
    PField_Battles:447:in `pbBossWildBattle'
    PField_Battles:444:in `pbBattleAnimation'
    PField_Battles:444:in `pbBossWildBattle'
    
    Interpreter:276:in `pbExecuteScript'
    Interpreter:1606:in `command_355'
    Interpreter:494:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:163:in `updateold'
    Scene_Map:161:in `loop'
    Scene_Map:170:in `updateold'
    Unreal Time System:151:in `update'
     
    What does this error mean?

    This is the part to pay the most attention to:
    Code:
    Message: EliteBattle_Addon:2044:in `pbShowWindow'undefined method `visible=' for nil:NilClass
    That's letting you know that on line 2044 if your added script section you call .visible on something. Whatever that object is belongs to the Nil class, which doesn't have a visible method.
    The real problem then is that whatever the object is that you're trying to affect the visibility of hasn't been initialized properly. A variable hasn't been set or an argument hasn't been passed to a method properly. However it happened, the point is that when it gets to that line in the script there's nothing there to affect the visibility of, so you get an error.
    Even though I can't tell you more specifically what happened, the rest of that error message gives you a trail of breadcrumbs for what methods were invoked leading up to this error.
     
    Thank you so much, Poq. It's finally working. I cannot understand error messages sometimes, so thank you for the explanation.
     
    Back
    Top