You should consider joining our Discord to ask for support.

We created a support channel using the new Discord Forum feature!

You can also visit our new website, it has a help section in English and French

0 like 0 dislike
597 views
in Crash by (520 points)
closed by
Got the following crash when I opened the team summary screen

================================Erreur de script================================

Message :

undefined method `language' for nil:NilClass

Type : NoMethodError

Script : 01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb (PSDK)

Ligne : 84

Date : 12/01/2022 20:41:17

Game Version : 256

Logiciel : Pokémon SDK 25.10

===================================Backtraces===================================

[39] : 01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb (PSDK) | ligne 84 initialize

[38] : 01450 Systems/00000 General/00100 UI Generics/00100 SpriteStack.rb (PSDK) | ligne 45 new

[37] : 01450 Systems/00000 General/00100 UI Generics/00100 SpriteStack.rb (PSDK) | ligne 45 push

[36] : 01450 Systems/00102 Party/00002 UI/02000 UI__TeamButton.rb (PSDK) | ligne 39 initialize

[35] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 136 new

[34] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 136 create_team_buttons

[33] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 135 initialize

[32] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 135 new

[31] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 135 create_team_buttons

[30] : 01450 Systems/00102 Party/00003 GamePlay/00100 Party_Menu.rb (PSDK) | ligne 95 create_graphics

[29] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 251 main_begin

[28] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 152 main

[27] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 190 call_scene

[26] : 01450 Systems/00000 General/00100 GamePlay.rb (PSDK) | ligne 124 open_party_menu

[25] : 01450 Systems/00100 Menu/00003 GamePlay/00100 Menu.rb (PSDK) | ligne 192 open_party

[24] : 01450 Systems/00100 Menu/00003 GamePlay/00100 Menu.rb (PSDK) | ligne 182 action

[23] : 01450 Systems/00100 Menu/00003 GamePlay/00100 Menu.rb (PSDK) | ligne 51 update_inputs

[22] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 468 update

[21] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 504 update

[20] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 260 main_process

[19] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 153 main

[18] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 190 call_scene

[17] : 01450 Systems/00000 General/00100 GamePlay.rb (PSDK) | ligne 23 open_menu

[16] : 01450 Systems/00003 Map Engine/00003 GamePlay/00201 Scene_Map calling.rb (PSDK) | ligne 148 call_menu

[15] : 01450 Systems/00003 Map Engine/00003 GamePlay/00201 Scene_Map calling.rb (PSDK) | ligne 71 update_scene_calling

[14] : 01450 Systems/00003 Map Engine/00003 GamePlay/00201 Scene_Map calling.rb (PSDK) | ligne 69 each

[13] : 01450 Systems/00003 Map Engine/00003 GamePlay/00201 Scene_Map calling.rb (PSDK) | ligne 69 update_scene_calling

[12] : 01450 Systems/00003 Map Engine/00003 GamePlay/00200 Scene_Map.rb (PSDK) | ligne 24 update

[11] : 00060 Weather.rb (user) | ligne 130 update

[10] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 260 main_process

[9] : 01450 Systems/00000 General/00003 GamePlay__Base/00000 GamePlay__Base.rb (PSDK) | ligne 153 main

[8] : tools/GameLoader/Z_main.rb (PSDK) | ligne 17 <top (required)>

[7] : tools/GameLoader/3_load_extensions.rb (PSDK) | ligne 34 rgss_main

[6] : tools/GameLoader/50_load_game_uncompiled.rb (PSDK) | ligne 32 <top (required)>

[5] : ScriptLoad.rb (PSDK) | ligne 131 require

[4] : ScriptLoad.rb (PSDK) | ligne 131 load_tool

[3] : tools/GameLoader/Z_load_uncompiled.rb (PSDK) | ligne 10 <top (required)>

[2] : ScriptLoad.rb (PSDK) | ligne 131 require

[1] : ScriptLoad.rb (PSDK) | ligne 131 load_tool

[0] : Game.rb (RMXP) | ligne 8 <main>

===================================Fin du log===================================
closed with the note: Problem has been fixed

2 Answers

1 like 0 dislike
by (28.0k points)
 
Best answer

In the end it was not a PSDK error but a custom script error:

The line $options = @all_saves.compact.first&.options could make options nil if there was no save. Adding if $options = @all_saves.compact.first at the end of the line solve the issue.

0 like 0 dislike
by (28.0k points)
Is your game loading a Map intro?

Otherwise there's something not setting $options to its normal value and it's not normal because loading a game usually does it properly.
by (520 points)
No

Finally managed to replicate it. Initialized a brand new game, got my first pokemon, saved the game and then look at party menu which caused the crash. Doesn't happen if look at party menu first before saving.
If I reload the game and look at the party menu, it doesn't happen.

Could it perhaps be due to a wrong implementation this script:

module GamePlay
  class Load
    alias psdk_initialize initialize
    def initialize
      psdk_initialize
      $options = @all_saves.compact.first&.options
    end
  end
end
by (28.0k points)
This might be a side effect of the new scene generalization, we'll take a look, thanks for the steps.
...