Seen 17 Hours Ago
Posted 17 Hours Ago
237 posts
1.8 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?
Seen 17 Hours Ago
Posted 17 Hours Ago
237 posts
1.8 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.
Seen 17 Hours Ago
Posted 17 Hours Ago
237 posts
1.8 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'
Male
Seen 45 Minutes Ago
Posted 1 Hour Ago
858 posts
7.7 Years
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.
Seen 17 Hours Ago
Posted 17 Hours Ago
237 posts
1.8 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.
Male
Seen 45 Minutes Ago
Posted 1 Hour Ago
858 posts
7.7 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.
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.
Online now
Posted 2 Weeks Ago
58 posts
4.1 Years
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
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
Seen 3 Hours Ago
Posted 2 Days Ago
5 posts
229 Days
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[i][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[i][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.
Online now
Posted 2 Weeks Ago
58 posts
4.1 Years
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.
Seen 12 Hours Ago
Posted 12 Hours Ago
1 posts
1 Days
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
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