- 85
- Posts
- 7
- Years
- Seen Nov 24, 2023
I'm not sure why this happens. I'm trying to edit my scripts for different purposes, but, when that script is supposed to happen ingame, I keep getting an error window which doesn't crash the game, but it gives me the "undefined method for nil:NilClass" message, even though said methods (species,battler etc) do exist in the script.
Here's an example where I try to change Pikachu's fainting cry. For this one, the undefined method is "pokemon":
I'm guessing this could be a bug, since the script still plays out and doesn't crash the game, but the error window still pops up.
Here's an example where I try to change Pikachu's fainting cry. For this one, the undefined method is "pokemon":
Code:
def pbFainted(pkmn)
if isConst?(@battler.pokemon.species,PBSpecies,:PIKACHU)
pbSEPlay("Cries/025Cry_Faint")
else
frames=pbCryFrameLength(pkmn.pokemon)
pbPlayCry(pkmn.pokemon)
end
.
.
.
I'm guessing this could be a bug, since the script still plays out and doesn't crash the game, but the error window still pops up.
Last edited: