• 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.

The default Pokemon Essentials Day Care lady causes crashes by using deprecated scripts.

429
Posts
4
Years
  • You know the default Day Care Lady in Lerucean town? Trying to give her a Pokemon first gives me this warning:


    WARN: usage of deprecated method "pbCheckAble" or its alias.
    The method is slated to be removed in Essentials v20.
    Use "Player#has_other_able_pokemon?" instead.

    And then it gives me this error message followed by a Crash To Desktop.

    [Pokémon Essentials version 19.1]
    [Generation 8 Project v1.1.0]
    [v19.1 Hotfixes 1.0.7]

    Exception: RuntimeError
    Message: Script error in event 46 (coords 11,3), map 4 (Pokémon Lab):
    Exception: NoMethodError
    Message: undefined method `isSpecies?' for nil:NilClass

    ***Full script:
    pbDayCareDeposit(pbGet(1))


    Backtrace:
    221:Overworld_DayCare:55:in `block in pbDayCareDeposit'
    221:Overworld_DayCare:51:in `each'
    221:Overworld_DayCare:51:in `pbDayCareDeposit'
    (eval):1:in `execute_script'
    033:Interpreter:137:in `eval'
    033:Interpreter:137:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'


    Backtrace:
    033:Interpreter:189:in `rescue in execute_script'
    033:Interpreter:135:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'
    033:Interpreter:87:in `update'
    032:Scene_Map:157:in `block in update'
    032:Scene_Map:155:in `loop'
    032:Scene_Map:155:in `update'


    How do I fix this?
     
    Last edited:
    429
    Posts
    4
    Years
  • Update:

    Copypasting the day care NPC into Oak's lab and copypasting all her dialogue into a new NPC did not help.

    I'm tempted to just remove the "Is this the last pokemon?" check completely, even if it means some people empty their party using the day care.
     
    429
    Posts
    4
    Years
  • [Pokémon Essentials version 19.1]
    [Generation 8 Project v1.1.0]
    [v19.1 Hotfixes 1.0.7]

    Exception: RuntimeError
    Message: Script error in event 55 (coords 11,2), map 4 (Pokémon Lab):
    Exception: NoMethodError
    Message: undefined method `isSpecies?' for nil:NilClass

    ***Full script:
    pbDayCareDeposit(pbGet(1))


    Backtrace:
    221:Overworld_DayCare:55:in `block in pbDayCareDeposit'
    221:Overworld_DayCare:51:in `each'
    221:Overworld_DayCare:51:in `pbDayCareDeposit'
    (eval):1:in `execute_script'
    033:Interpreter:137:in `eval'
    033:Interpreter:137:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'


    Backtrace:
    033:Interpreter:189:in `rescue in execute_script'
    033:Interpreter:135:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'
    033:Interpreter:87:in `update'
    032:Scene_Map:157:in `block in update'
    032:Scene_Map:155:in `loop'
    032:Scene_Map:155:in `update'


    Removing her "Is this your final pokemon?" checks did not solve the problem.
     
    71
    Posts
    6
    Years
    • Seen yesterday
    i remember the fossil and day care npcs having some bug, i fixed mine but I didn't really register what I did, if u show me how u got ur event maybe ill be able to help, u can remove the unnecessary msgs, etc if u want to make it shorter
    either way seems like ur variable 1 for some reason is holding a nil instead of a pokemon
     
    1,408
    Posts
    10
    Years
    • Seen yesterday
    What exactly is it that you're doing? Like what is your party consisting of, what are you depositing, what part of the process does the error occur, etc. Because I just tried and the event works fine (other than the first deprecation warning, which is easily solved by just following what the error says to do).
     
    429
    Posts
    4
    Years
  • I attempted to put a Mismagius in the Day Care.

    Fixing the use of a deprecated "IsAble" function gave me this in the debug screen:

    Exception `NoMethodError' at 221:Overworld_DayCare:55 - undefined method `isSpecies?' for nil:NilClass
    Exception `RuntimeError' at 033:Interpreter:189 - Script error in event 54 (coords 10,2), map 4 (Pok├®mon Lab):
    Exception: NoMethodError
    Message: undefined method `isSpecies?' for nil:NilClass

    ***Full script:
    pbDayCareDeposit(pbGet(1))


    Backtrace:
    221:Overworld_DayCare:55:in `block in pbDayCareDeposit'
    221:Overworld_DayCare:51:in `each'
    221:Overworld_DayCare:51:in `pbDayCareDeposit'
    (eval):1:in `execute_script'
    033:Interpreter:137:in `eval'
    033:Interpreter:137:in `execute_script'
    034:Interpreter_Commands:1030:in `command_355'
    034:Interpreter_Commands:116:in `execute_command'
    033:Interpreter:127:in `block in update'
    033:Interpreter:87:in `loop'
     
    Last edited:
    1,408
    Posts
    10
    Years
    • Seen yesterday
    What did you actually input as a "fix"? Because I just did it, and the event works flawlessly. Which means this isn't a v19.1 error, its an error on your end.

    There are two instances of !pbCheckAble(pbGet(1)) in the event. Both of which should be changed to !$Trainer.has_other_able_pokemon?(pbGet(1)) instead. After that, you're golden. I have no idea what these `isSpecies?' errors you're getting are about. I can't reproduce them even when purposely putting in the wrong code to try and figure out what you did.
     
    429
    Posts
    4
    Years
  • There is no "Fix" I'm using, I'm using the default NPC as seen in Lerucean town. I go to her, I tell her to take my Pokemon, and... the game crashes.

    Her check for whether I'm giving her my final Pokemon or an egg or something else was causing crashes, so I removed them.

    Now she's crashing the game every time she attempts to take my Pokemon. Whether it's my final mon or not.
     
    1,408
    Posts
    10
    Years
    • Seen yesterday
    There is no "Fix" I'm using, I'm using the default NPC as seen in Lerucean town. I go to her, I tell her to take my Pokemon, and... the game crashes.

    Her check for whether I'm giving her my final Pokemon or an egg or something else was causing crashes, so I removed them.

    Now she's crashing the game every time she attempts to take my Pokemon. Whether it's my final mon or not.
    I'm pretty sure you just did something by accident that broke the code. Because the event works absolutely fine, and I've tested with every party situation I could think of to trigger the crash, including eggs and small party sizes. If I don't have enough eligible Pokemon to deposit, she tells me so and the event ends. If I do, I can deposit up to two Pokemon. If I have a full party, I cannot withdraw from the daycare. If I don't, then I can. So you're either triggering some extremely niche and specific situation that I can't think of, or you just broke your own event somehow.
     
    71
    Posts
    6
    Years
    • Seen yesterday
    I just tried downloading and unzipping a clean copy of Pokemon Essentials and the Day Care lady is still doing this. What are you using?
    ctrl shift f in ur scripts
    def pbDayCareDeposit(index)
    and show what that function looks like or take a screenshot around lines 50~70

    it should look like
    Code:
    def pbDayCareDeposit(index)
      for i in 0...2
        next if $PokemonGlobal.daycare[i][0]
        $PokemonGlobal.daycare[i][0] = $Trainer.party[index]
        $PokemonGlobal.daycare[i][0].time_form_set = nil
        $PokemonGlobal.daycare[i][0].form = 0 if $Trainer.party[index].species == :SHAYMIN
        $PokemonGlobal.daycare[i][1] = $Trainer.party[index].level
        $PokemonGlobal.daycare[i][0].heal
        $Trainer.party[index] = nil
        $Trainer.party.compact!
        $PokemonGlobal.daycareEgg      = 0
        $PokemonGlobal.daycareEggSteps = 0
        return
      end
      raise _INTL("No room to deposit a Pokémon")
    end
     
    Last edited:
    8
    Posts
    3
    Years
    • Seen Jan 29, 2024
    Hello, I am still new to writing formats in forum, if I can do something better, let me know.

    Which means this isn't a v19.1 error, its an error on your end.
    Looks like is a Generation 8 Project error. I am using Gen 8 Project and I had the error too without changing that part of the game.

    $PokemonGlobal.daycare[0].form = 0 if $Trainer.party[index].species == :SHAYMIN
    The problem is this part of the code, or at least the lack of this part. I can`t see that part in Vanilla Essential and with Generation 8 Project is coded like this:
    $PokemonGlobal.daycare[0].form = 0 if p.isSpecies?(:SHAYMIN)


    When I deleted (commented) that part, Day Care worked fine. It works fine with the code that posted Aioross. And it works fine with Vanilla Essentials too.
     
    71
    Posts
    6
    Years
    • Seen yesterday
    I have no idea why but your script fixed the Day Care lady. The old script had a different line checking for Shaymin.

    I think ur biggest problem was the deprecated method throw you off the real problem.
    Basically the species check wasn't being applied to a pokemon. It was hard to help you because this came from gen 8 and not base essentials so we were looking in the wrong place, I had this issue and fixed it a long time ago but I didn't remember if I fixed the event or the script, that's why I asked you to show your event.
    I just happen to remember that shaymin line and put here that script. The fix itself was simple, the parameter being passed is an index so I just replaced whatever was there with $Trainer.party[index] which is a pokemon so the species check will work.
     
    24
    Posts
    2
    Years
  • bro download clean version of Pokemon Essentials and open it in RPGXP
    GO to Scripts and Find Overworld_Daycare Script Copy this replace with your game Overworld_Daycare Script
    this Fix your Code
     
    1
    Posts
    2
    Years
    • Seen Dec 5, 2021
    for me it was the bold line that was the problem
    the Line Just did not exist in the script so i add it and thats work .

    ctrl shift f in ur scripts
    def pbDayCareDeposit(index)
    and show what that function looks like or take a screenshot around lines 50~70

    it should look like
    Code:
    def pbDayCareDeposit(index)
      for i in 0...2
        next if $PokemonGlobal.daycare[i][0]
        $PokemonGlobal.daycare[i][0] = $Trainer.party[index]
        $PokemonGlobal.daycare[i][0].time_form_set = nil
       [U][B] $PokemonGlobal.daycare[i][0].form = 0 if $Trainer.party[index].species == :SHAYMIN[/B][/U]
        $PokemonGlobal.daycare[i][1] = $Trainer.party[index].level
        $PokemonGlobal.daycare[i][0].heal
        $Trainer.party[index] = nil
        $Trainer.party.compact!
        $PokemonGlobal.daycareEgg      = 0
        $PokemonGlobal.daycareEggSteps = 0
        return
      end
      raise _INTL("No room to deposit a Pokémon")
    end
     
    Back
    Top