- 220
- Posts
- 13
- Years
- Seen Nov 29, 2021
As far as I know my code is unchanged:
But when a pokemon gets badly poisoned (badly only, regular works fine), I get an error message:
---------------------------
Pokemon Essentials
---------------------------
Exception: NoMethodError
Message: private method `gsub' called for true:TrueClass
DrawText:215:in `toUnformattedText'
DrawText:225:in `unformattedTextLength'
SpriteWindow:3558:in `setText'
SpriteWindow:3531:in `text='
PokeBattle_Scene:1422:in `pbDisplayMessage'
PokeBattle_Battle:2435:in `pbDisplay'
PokeBattle_BattlerEffects:206:in `pbPoison'
PokeBattle_MoveEffects:242:in `pbEffect'
PokeBattle_Battler:2714:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:2670:in `each'
This exception was logged in
C:\Users\chris\Saved Games/Pokemon Essentials/errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
That was from using Toxic, the pokemon then attempts to use Toxic again (but obviously fails since the opponent is already poisoned).
EDIT: Tested, occurs in my unedited Essentials copy.
Code:
def pbPoison(attacker,msg=nil,toxic=false)
self.status=PBStatuses::POISON
self.statusCount=(toxic) ? 1 : 0
self.effects[PBEffects::Toxic]=0
@battle.pbCommonAnimation("Poison",self,nil)
if msg && msg!=""
@battle.pbDisplay(msg)
else
if toxic
@battle.pbDisplay(_INTL("{1} was badly poisoned!",pbThis))
else
@battle.pbDisplay(_INTL("{1} was poisoned!",pbThis))
end
end
if toxic
PBDebug.log("[Status change] #{pbThis} was badly poisoned]")
else
PBDebug.log("[Status change] #{pbThis} was poisoned")
end
if attacker && self.index!=attacker.index &&
self.hasWorkingAbility(:SYNCHRONIZE)
if attacker.pbCanPoisonSynchronize?(self)
PBDebug.log("[Ability triggered] #{self.pbThis}'s Synchronize")
attacker.pbPoison(nil,_INTL("{1}'s {2} poisoned {3}!",self.pbThis,
PBAbilities.getName(self.ability),attacker.pbThis(true)),toxic)
end
end
end
---------------------------
Pokemon Essentials
---------------------------
Exception: NoMethodError
Message: private method `gsub' called for true:TrueClass
DrawText:215:in `toUnformattedText'
DrawText:225:in `unformattedTextLength'
SpriteWindow:3558:in `setText'
SpriteWindow:3531:in `text='
PokeBattle_Scene:1422:in `pbDisplayMessage'
PokeBattle_Battle:2435:in `pbDisplay'
PokeBattle_BattlerEffects:206:in `pbPoison'
PokeBattle_MoveEffects:242:in `pbEffect'
PokeBattle_Battler:2714:in `pbProcessMoveAgainstTarget'
PokeBattle_Battler:2670:in `each'
This exception was logged in
C:\Users\chris\Saved Games/Pokemon Essentials/errorlog.txt.
Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK
---------------------------
That was from using Toxic, the pokemon then attempts to use Toxic again (but obviously fails since the opponent is already poisoned).
EDIT: Tested, occurs in my unedited Essentials copy.
Last edited: