• 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!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist 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.

Error after attempting to add gen 6 move and ability effects

  • 55
    Posts
    12
    Years
    • Seen Jul 8, 2023
    So, I had gen VI pokemon in the game, the abilities, the moves, etc. I forgot to add the effects, so I copied the scripts I needed from the gen IV project and then my game keeps giving me errors that I haven't had before (seems to be something with crafty shield):

    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: RuntimeError

    Message: Script error within event 2, map 21 (House 5):

    Exception: NameError

    Message: Section074: 16in `initialize'uninitialized constant PBEffects::CraftyShield

    ***Full script:

    pbTrainerBattle(PBTrainers::TEAMCOMETGRUNT,"Ronald",_I("Beaten by a newb..."),false,0, false)

    Interpreter:243:in `pbExecuteScript'

    PokeBattle_Battle:332:in `new'

    PokeBattle_Battle:332:in `initialize'

    PTrainer_NPCTrainers:319:in `new'

    PTrainer_NPCTrainers:319:in `pbTrainerBattle'

    (eval): 1in `pbExecuteScript'

    Interpreter:794:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:794:in `command_111'

    Interpreter:320:in `execute_command'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:794:in `command_111'

    Interpreter:320:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:115:in `update'

    Scene_Map:113:in `loop'

    Scene_Map:126:in `update'

    Scene_Map:68:in `main'









    Crafty Shield Code:

    ################################################################################
    # Crafty Shield
    ################################################################################
    class PokeBattle_Move_137 < PokeBattle_Move
    def pbEffect(attacker,opponent,hitnum=0,alltargets=nil,showanimation=true)
    if attacker.pbOwnSide.effects[PBEffects::CraftyShield]
    @battle.pbDisplay(_INTL("But it failed!"))
    return -1
    end
    pbShowAnimation(@id,attacker,nil,hitnum,alltargets,showanimation)
    attacker.pbOwnSide.effects[PBEffects::CraftyShield]=true
    @battle.pbDisplay(_INTL("Crafty Shield protected your team!",attacker.pbThis))
    return 0
    end
    end
     
    Never mind I fixed that, but now there is an error in a script section I can't even find, can someone tell me where PBBattleAnimation is?
     
    In the script editor, pressing ctrl+shift+f will allow you to search through all script sections, compared to ctrl+f that only lets you search through the one you're currently hovering over/editing. If you're looking for the code that makes a certain function work, type "def " in front of that function's name.

    However, I've personally noted that it's easier to go get the Gen VI Pack and remove the stuff you don't want than it is to try and canabalize basic essentials and the Gen VI Pack together.
     
    However, I've personally noted that it's easier to go get the Gen VI Pack and remove the stuff you don't want than it is to try and canabalize basic essentials and the Gen VI Pack together.

    I figured this out the hard way! I remember trying to bring parts of it into my game, then saying **** it and just using everything the pack gave me and redid all my scripts.
     
    Back
    Top