• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Badly Poisoned error message

220
Posts
13
Years
    • Seen Nov 29, 2021
    As far as I know my code is unchanged:
    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
    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.
     
    Last edited:
    220
    Posts
    13
    Years
    • Seen Nov 29, 2021
    ? As far as I'm aware I downloaded straight off of the website.
    Oh wait, I'm only on 1.6.1. Huh. Must of clicked the wrong link.
     
    Last edited:
    Back
    Top