I tried adding a type to an exisiting pokemon (electric to alakazam line) and when i enter a battle it shows an error but the game continues normally
[Pokemon Reborn 19.5.33]
Exception: NoMethodError
Message: undefined method `weak?' for nil:NilClass
PBTypesExtra:17:in `oneTypeEff'
Battle_Move:445:in `pbTypeModifier'
Battle_AI:7902:in `pbTypeModNoMessages'
Battle_AI:10952:in `pbRoughDamage'
Battle_AI:362:in `block in buildMoveScores'
Battle_AI:357:in `each'
Battle_AI:357:in `buildMoveScores'
Battle_AI:165:in `block in processAIturn'
Battle_AI:146:in `each'
Battle_AI:146:in `processAIturn'
Battle_Scene:3906:in `pbChooseEnemyCommand'
Battle:4115:in `pbCommandPhase'
Battle:3896:in `block in pbRunTurn'
PBDebug:4:in `logonerr'
Battle:3895:in `pbRunTurn'
Battle:3882:in `block (2 levels) in pbBattleLoop'
Battle:3881:in `loop'
Battle:3881:in `block in pbBattleLoop'
Battle:3880:in `catch'
Battle:3880:in `pbBattleLoop'
Battle:3871:in `pbStartBattle'
Trainers:390:in `block (2 levels) in pbTrainerBattle'
Field:751:in `pbSceneStandby'
Trainers:389:in `block in pbTrainerBattle'
Field:1103:in `pbBattleAnimation'
can someone tell me how to solve this or the reason behind it?