Thread: [Essentials Script] Elite Battle 2015: Gen 5 battle skin
View Single Post
  #33    
Old March 1st, 2015 (8:21 AM).
Zoruarockszoroark's Avatar
Zoruarockszoroark Zoruarockszoroark is offline
     
    Join Date: Jun 2012
    Gender: Male
    Posts: 13
    I encountered an error with the new DynamicScene script when an opposing trainer's pokemon is sent into battle:
    Spoiler:
    Message: Script error within event 102, map 39 (Route 6 ):
    Exception: NoMethodError
    Message: Section151:870:in `pbTrainerSendOut'undefined method `isShiny?' for #<PokeBattle_Battler:0xac7e1b0>
    ***Full script:
    pbTrainerBattle(PBTrainers::POKEMONRANGER_M,"I can hear mother nature. She is telling me to battle with you!",_I("But how?"),false,0,false)
    Interpreter:243:in `pbExecuteScript'
    PokeBattle_Battle:1241:in `pbSendOut'
    Dynamic Battle:78:in `pbStartBattleCore'
    PokeBattle_Battle:2229:in `pbStartBattle'
    PokemonTrainers:427:in `pbTrainerBattle'
    PokemonTrainers:426:in `pbSceneStandby'
    PokemonTrainers:428:in `pbTrainerBattle'
    PokemonTrainers:425:in `pbBattleAnimation'
    PokemonTrainers:425:in `pbTrainerBattle'
    (eval):1:in `pbExecuteScript'

    Interpreter:276:in `pbExecuteScript'
    Interpreter:788:in `command_111'
    Interpreter:320:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
    Scene_Map:101:in `loop'
    Scene_Map:114:in `update'
    Scene_Map:68:in `main'


    It pertains to the shiny pokemon checks.
    To fix it, around line 871, find
    Code:
    if @battle.battlers[1].isShiny?
            pbCommonAnimation("Shiny",@battle.battlers[1],nil)
          end
          if @battle.doublebattle && @battle.battlers[3].isShiny?
            pbCommonAnimation("Shiny",@battle.battlers[3],nil)
          end
    replace that with this:
    Code:
     if @battle.party2[1].isShiny?
            pbCommonAnimation("Shiny",@battle.battlers[1],nil)
          end
          if @battle.doublebattle && @battle.party2[3].isShiny?
            pbCommonAnimation("Shiny",@battle.battlers[3],nil)
          end