Fixes crash when swapping diancie for another pokemon after catching

This commit is contained in:
infinitefusion
2024-12-21 17:14:09 -05:00
parent c846150afd
commit a6dc5167d1

View File

@@ -982,7 +982,7 @@ def swapReleaseCaughtPokemon(caughtPokemon)
index = pbGet(1) index = pbGet(1)
return false if index == -1 return false if index == -1
releasedPokemon = $Trainer.party[index] releasedPokemon = $Trainer.party[index]
pbDisplay("#{releasedPokemon.name} was released.") pbMessage("#{releasedPokemon.name} was released.")
pbRemovePokemonAt(index) pbRemovePokemonAt(index)
pbStorePokemon(caughtPokemon) pbStorePokemon(caughtPokemon)