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

pbAccuraceyCheck is an Undefined Method... for some reason?

Sir_Tman

Overworked game Dev
  • 198
    Posts
    9
    Years
    I haven't posted in here in a very long time, moreover.

    For whatever reason when a pokemon uses an attacking move I get this error
    PokeBattle_Move_xxx in the error changes depending on the move being used which is understandable, but it always returns with pbAccuracyCheck being the issue.
    Spoiler:

    This is the pbAccuracyCheck from PokeBattle_Move

    Spoiler:
     
    After checking through all of my code and pervious versions of my code, I still can't find anything wrong, when I run battle logging for tests this is what returns
    Code:
    ***Round 1***
    [AI] The wild Bulbasaur's moves: Tackle=100, Growl=100
    [AI] Will use Tackle
    [Priority] Rowlet (0), the wild Bulbasaur (1)
    Rowlet used Tackle
    
    **Exception: undefined method `pbAccuracyCheck' for #<PokeBattle_Move_000:0xf542258>
    ["Section082:3288:in `pbSuccessCheck'", "Section082:3485:in `pbProcessMoveAgainstTarget'", "Section082:3481:in `each'", "Section082:3481:in `pbProcessMoveAgainstTarget'", "Section082:4052:in `pbUseMove'", "Section082:4032:in `loop'", "Section082:4055:in `pbUseMove'", "Section082:4295:in `pbProcessTurn'", "Section082:4294:in `logonerr'", "Section082:4294:in `pbProcessTurn'", "Section087:3300:in `pbAttackPhase'", "Section087:3297:in `each'", "Section087:3297:in `pbAttackPhase'", "Section087:3285:in `times'", "Section087:3285:in `pbAttackPhase'", "Section087:2978:in `pbStartBattleCore'", "Section087:2977:in `logonerr'", "Section087:2977:in `pbStartBattleCore'", "Section087:2963:in `loop'", "Section087:2986:in `pbStartBattleCore'", "Section087:2772:in `pbStartBattle'", "Section101:905:in `pbWildBattle'", "Section101:904:in `pbSceneStandby'", "Section101:906:in `pbWildBattle'", "Section101:903:in `pbBattleAnimation'", "Section101:903:in `pbWildBattle'", "Section174:301:in `pbDebugMenuActions'", "Section174:744:in `pbDebugMenu'", "Section174:710:in `loop'", "Section174:746:in `pbDebugMenu'", "Section132:217:in `pbStartPokemonMenu'", "Section132:216:in `pbFadeOutIn'", "Section132:216:in `pbStartPokemonMenu'", "Section132:141:in `loop'", "Section132:245:in `pbStartPokemonMenu'", "Section058:204:in `call_menu'", "Section058:174:in `update'", "Section058:68:in `main'", "Section058:65:in `loop'", "Section058:72:in `main'", "Section189:133:in `mainFunctionDebug'", "Section189:111:in `mainFunction'", "Section189:111:in `pbCriticalCode'", "Section189:111:in `mainFunction'", "Section189:143", "Section189:142:in `loop'", "Section189:151"]
    
    The wild Bulbasaur used Tackle
    
    **Exception: undefined method `pbAccuracyCheck' for #<PokeBattle_Move_000:0xf99e840>
    ["Section082:3288:in `pbSuccessCheck'", "Section082:3485:in `pbProcessMoveAgainstTarget'", "Section082:3481:in `each'", "Section082:3481:in `pbProcessMoveAgainstTarget'", "Section082:4052:in `pbUseMove'", "Section082:4032:in `loop'", "Section082:4055:in `pbUseMove'", "Section082:4295:in `pbProcessTurn'", "Section082:4294:in `logonerr'", "Section082:4294:in `pbProcessTurn'", "Section087:3300:in `pbAttackPhase'", "Section087:3297:in `each'", "Section087:3297:in `pbAttackPhase'", "Section087:3285:in `times'", "Section087:3285:in `pbAttackPhase'", "Section087:2978:in `pbStartBattleCore'", "Section087:2977:in `logonerr'", "Section087:2977:in `pbStartBattleCore'", "Section087:2963:in `loop'", "Section087:2986:in `pbStartBattleCore'", "Section087:2772:in `pbStartBattle'", "Section101:905:in `pbWildBattle'", "Section101:904:in `pbSceneStandby'", "Section101:906:in `pbWildBattle'", "Section101:903:in `pbBattleAnimation'", "Section101:903:in `pbWildBattle'", "Section174:301:in `pbDebugMenuActions'", "Section174:744:in `pbDebugMenu'", "Section174:710:in `loop'", "Section174:746:in `pbDebugMenu'", "Section132:217:in `pbStartPokemonMenu'", "Section132:216:in `pbFadeOutIn'", "Section132:216:in `pbStartPokemonMenu'", "Section132:141:in `loop'", "Section132:245:in `pbStartPokemonMenu'", "Section058:204:in `call_menu'", "Section058:174:in `update'", "Section058:68:in `main'", "Section058:65:in `loop'", "Section058:72:in `main'", "Section189:133:in `mainFunctionDebug'", "Section189:111:in `mainFunction'", "Section189:111:in `pbCriticalCode'", "Section189:111:in `mainFunction'", "Section189:143", "Section189:142:in `loop'", "Section189:151"]
    
    [End of round]
    
    ***Round 2***
    [AI] The wild Bulbasaur's moves: Tackle=100, Growl=100
    [AI] Will use Tackle
    [Priority] Rowlet (0), the wild Bulbasaur (1)
    Rowlet used Tackle
    
    **Exception: undefined method `pbAccuracyCheck' for #<PokeBattle_Move_000:0xf542258>
    ["Section082:3288:in `pbSuccessCheck'", "Section082:3485:in `pbProcessMoveAgainstTarget'", "Section082:3481:in `each'", "Section082:3481:in `pbProcessMoveAgainstTarget'", "Section082:4052:in `pbUseMove'", "Section082:4032:in `loop'", "Section082:4055:in `pbUseMove'", "Section082:4295:in `pbProcessTurn'", "Section082:4294:in `logonerr'", "Section082:4294:in `pbProcessTurn'", "Section087:3300:in `pbAttackPhase'", "Section087:3297:in `each'", "Section087:3297:in `pbAttackPhase'", "Section087:3285:in `times'", "Section087:3285:in `pbAttackPhase'", "Section087:2978:in `pbStartBattleCore'", "Section087:2977:in `logonerr'", "Section087:2977:in `pbStartBattleCore'", "Section087:2963:in `loop'", "Section087:2986:in `pbStartBattleCore'", "Section087:2772:in `pbStartBattle'", "Section101:905:in `pbWildBattle'", "Section101:904:in `pbSceneStandby'", "Section101:906:in `pbWildBattle'", "Section101:903:in `pbBattleAnimation'", "Section101:903:in `pbWildBattle'", "Section174:301:in `pbDebugMenuActions'", "Section174:744:in `pbDebugMenu'", "Section174:710:in `loop'", "Section174:746:in `pbDebugMenu'", "Section132:217:in `pbStartPokemonMenu'", "Section132:216:in `pbFadeOutIn'", "Section132:216:in `pbStartPokemonMenu'", "Section132:141:in `loop'", "Section132:245:in `pbStartPokemonMenu'", "Section058:204:in `call_menu'", "Section058:174:in `update'", "Section058:68:in `main'", "Section058:65:in `loop'", "Section058:72:in `main'", "Section189:133:in `mainFunctionDebug'", "Section189:111:in `mainFunction'", "Section189:111:in `pbCriticalCode'", "Section189:111:in `mainFunction'", "Section189:143", "Section189:142:in `loop'", "Section189:151"]
    
    The wild Bulbasaur used Tackle
    
    **Exception: undefined method `pbAccuracyCheck' for #<PokeBattle_Move_000:0xf99e840>
    ["Section082:3288:in `pbSuccessCheck'", "Section082:3485:in `pbProcessMoveAgainstTarget'", "Section082:3481:in `each'", "Section082:3481:in `pbProcessMoveAgainstTarget'", "Section082:4052:in `pbUseMove'", "Section082:4032:in `loop'", "Section082:4055:in `pbUseMove'", "Section082:4295:in `pbProcessTurn'", "Section082:4294:in `logonerr'", "Section082:4294:in `pbProcessTurn'", "Section087:3300:in `pbAttackPhase'", "Section087:3297:in `each'", "Section087:3297:in `pbAttackPhase'", "Section087:3285:in `times'", "Section087:3285:in `pbAttackPhase'", "Section087:2978:in `pbStartBattleCore'", "Section087:2977:in `logonerr'", "Section087:2977:in `pbStartBattleCore'", "Section087:2963:in `loop'", "Section087:2986:in `pbStartBattleCore'", "Section087:2772:in `pbStartBattle'", "Section101:905:in `pbWildBattle'", "Section101:904:in `pbSceneStandby'", "Section101:906:in `pbWildBattle'", "Section101:903:in `pbBattleAnimation'", "Section101:903:in `pbWildBattle'", "Section174:301:in `pbDebugMenuActions'", "Section174:744:in `pbDebugMenu'", "Section174:710:in `loop'", "Section174:746:in `pbDebugMenu'", "Section132:217:in `pbStartPokemonMenu'", "Section132:216:in `pbFadeOutIn'", "Section132:216:in `pbStartPokemonMenu'", "Section132:141:in `loop'", "Section132:245:in `pbStartPokemonMenu'", "Section058:204:in `call_menu'", "Section058:174:in `update'", "Section058:68:in `main'", "Section058:65:in `loop'", "Section058:72:in `main'", "Section189:133:in `mainFunctionDebug'", "Section189:111:in `mainFunction'", "Section189:111:in `pbCriticalCode'", "Section189:111:in `mainFunction'", "Section189:143", "Section189:142:in `loop'", "Section189:151"]
    
    [End of round]
    
    ***Round 3***

    This has essentially stalled all progress of developing my game... please help
     
    The issue is not within the accuracy check but rather in pbSuccessCheck (just as it says in the error message)
    So we would need to see the whole script and please mark which line is 3288
     
    I did wonder about that and I had a look at the pbSuccessCheck when I was first going through the error output and checking each line it asked about.

    pbSuccessCheck from battler
    Spoiler:


    Line 3288 is
    Code:
    if !override && (miss || !thismove.pbAccuracyCheck(user,target)) # Includes Counter/Mirror Coat

    In a clean version of pokemon Essentials v17 this is the same line in the same function
    Code:
    if !override && (miss || !thismove.pbAccuracyCheck(user,target)) # Includes Counter/Mirror Coat
     
    Last edited:
    Back
    Top