yonicstudios
Game Developer
- 51
- Posts
- 9
- Years
- Spain
- Seen May 20, 2022
On Essentials 16.2, when a trainer tries to use one of the items specified on its PBS file, an error occurs.
I think this is because idxTarget, a parameter of the method pbEnemyShouldUseItem? (in PokéBattle_AI), is nil by default and is passed as nil in pbRegisterItem (in PokéBattle_Battle).
But I don't know how to solve this error.
The items are specified as follows in the PBS file, just in case I've made a mistake there:
Code:
Exception: NoMethodError
Message: undefined method `>=' for nil:NilClass
PokeBattle_Battle:1609:in `pbRegisterItem'
PokeBattle_AI:3767:in `pbEnemyShouldUseItem?'
PokeBattle_AI:4056:in `pbDefaultChooseEnemyCommand'
PokeBattle_Scene:2747:in `pbChooseEnemyCommand'
PokeBattle_Battle:2738:in `pbCommandPhase_ebs'
PokeBattle_Battle:2733:in `each'
PokeBattle_Battle:2733:in `pbCommandPhase_ebs'
EliteBattle_Battle:292:in `pbCommandPhase'
EliteBattle_Battle:222:in `pbStartBattleCore'
EliteBattle_Battle:221:in `logonerr'
But I don't know how to solve this error.
The items are specified as follows in the PBS file, just in case I've made a mistake there:
Code:
POKEMANIAC
Hubert
6,FULLRESTORE,FULLRESTORE,FULLRESTORE,FULLRESTORE
ZUBAT,15,,SCREECH,GROWL,,,0
ZUBAT,15,,SCREECH,GROWL,,,0
ZUBAT,15,,SCREECH,GROWL,,,0
ZUBAT,15,,SCREECH,GROWL,,,0
ZUBAT,15,,SCREECH,GROWL,,,0
ZUBAT,15,,SCREECH,GROWL,,,0
Last edited: