View Single Post
Old May 8th, 2008 (1:27 AM).
glenn14256 glenn14256 is offline
    Join Date: May 2008
    Posts: 3
    Hi everyone!

    I need some help with trainer battles. I got it to work and all, and even the custom Pokemon and trainer sprites work properly. But I keep getting this error when battling a trainer. I think it has something to do with a script error making the trainer clueless on what to do next, the result -> it won't do anything at all. This is the error:

    Exception: NameError
    Message: undefined local variable or method `attacker' for #<PokeBattle_Battle:0x5740760>
    PokeBattle_AI:515:in `pbEnemyShouldWithdraw?'
    PokeBattle_ActualScene:2209:in `pbChooseEnemyCommand'
    PokeBattle_Battle:2333:in `pbCommandPhase'
    PokeBattle_Battle:2328:in `each'
    PokeBattle_Battle:2328:in `pbCommandPhase'
    PokeBattle_Battle:722:in `pbStartBattleCore'
    PokeBattle_Battle:721:in `logonerr'
    PokeBattle_Battle:721:in `pbStartBattleCore'
    PokeBattle_Battle:705:in `loop'
    PokeBattle_Battle:734:in `pbStartBattleCore'

    "#<PokeBattle_Battle:0xXXXXXXX>" (XXXXXXX is dynamic depending on which trainer you battle).

    I would really like to get some help with this. So thanks in advance!