• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Friend Safari

Resource Friend Safari 1.1.3

1704991683616.png


I keep getting this crash when I entered in the Friend Safari room and I don't know what to do.
Does any of you know what I need to do?
 
I have just tested it and it works fine for me. Try deleting the plugin and installing it again? In the mean time, I'll keep looking at the code.
 
Ok, found the error. I'll post an update with the fix and some things I included and forgot to update.
 
LinKazamine updated Friend Safari with a new update entry:

1.0.11

  • Added a compiler that automatically adds flags to the pokemon from the file in PBS/Plugins/Friend Safari. Go to Lin's Friend Safari/01 - Main and delete the compiler of the version you aren't using.
  • Included a file that automatically adds the "Fossil", "Legendary", "Mythical", "Paradox" and "UltraBeast" to the pokemon file.
  • Changed the extra probability at shinyness to extra retries.
  • Fixed an error caused by leftover $PokemonSystem that were not changed to...

Read the rest of this update entry...
 
In the configuration, you have to define the ID of all the maps where you can catch pokemon in the friend safari in the SAFARI_MAPS. Then, you have to define at least 1 wild encounter in those maps. After that, all you have to do is have the player choose a friend's safari (there are examples in the example map of that) and transport them to one of the maps. The plugin will automatically change the wild pokemon with one of the pokemon from the chosen safari.
 
In the configuration, you have to define the ID of all the maps where you can catch pokemon in the friend safari in the SAFARI_MAPS. Then, you have to define at least 1 wild encounter in those maps. After that, all you have to do is have the player choose a friend's safari (there are examples in the example map of that) and transport them to one of the maps. The plugin will automatically change the wild pokemon with one of the pokemon from the chosen safari.
I only put in "120" as a Safari Map for now. I don't understand what else I need to put in.
 
You can have one map for it, like in X and Y. Or you could have multiple maps, all looking different to match the safari's type. For example, have a cave for ground, poison, rock and steel pokemon. And a place surrounded by lakes for water types.
 
It crashes when I try to set my friend code or when I try to add Blue or Leaf.

[Pokémon Essentials version 21.1]

Script error in event 4 (coords 13,3), map 22 (test)
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, String, GameData::Type], but got NilClass.

***Full script:
type = pbGet(1)
pbGetPokemonTypeList(type)
pbGetPokemonSample
pkmn = $PokemonGlobal.pkmnlist
pbCreatePlayerSafari(type, pkmn)
pbSaveSafariTypeToTxt

Backtrace:
Validation:29:in `validate'
[Lin's Friend Safari] Safari_Main.rb:60:in `initialize'
[Lin's Friend Safari] Safari_Player.rb:10:in `new'
[Lin's Friend Safari] Safari_Player.rb:10:in `pbCreatePlayerSafari'
(eval):5:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'


[Pokémon Essentials version 21.1]

Script error in event 7 (coords 7,10), map 22 (test)
Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, String, GameData::Type], but got NilClass.

***Full script:
pbGetNPC("Leaf", 1, 2)
name = pbGet(1)
type = pbGet(2)
pkmn = $PokemonGlobal.pkmnlist
pbAddNPC(name, type, pkmn)

Backtrace:
Validation:29:in `validate'
[Lin's Friend Safari] Safari_Main.rb:60:in `initialize'
[Lin's Friend Safari] Safari_NPC.rb:46:in `new'
[Lin's Friend Safari] Safari_NPC.rb:46:in `pbAddNPC'
(eval):5:in `execute_script'
Interpreter:138:in `eval'
Interpreter:138:in `execute_script'
Interpreter_Commands:1177:in `command_355'
Interpreter_Commands:116:in `execute_command'
Interpreter:130:in `block in update'
 
New error:

[2025-07-14 08:20:49 -0500]
[Pokémon Essentials version 21.1]

Script error in event 3 (coords 14,7), map 22 (test)
Exception: TypeError
Message: Argument 0: Expected string

***Full script:
pbShowNPCSafariType

Backtrace:
DrawText:1109:in `text_size'
DrawText:1109:in `block in pbDrawTextPositions'
DrawText:1108:in `each'
DrawText:1108:in `pbDrawTextPositions'
[Lin's Friend Safari] Safari_Show_Scene.rb:91:in `block (2 levels) in draw_text'
[Lin's Friend Safari] Safari_Show_Scene.rb:57:in `each'
[Lin's Friend Safari] Safari_Show_Scene.rb:57:in `each_with_index'
[Lin's Friend Safari] Safari_Show_Scene.rb:57:in `block in draw_text'
[Lin's Friend Safari] Safari_Show_Scene.rb:56:in `each'
[Lin's Friend Safari] Safari_Show_Scene.rb:56:in `each_with_index'

And this one too:

[2025-07-14 08:31:03 -0500]
[Pokémon Essentials version 21.1]

Script error in event 1 (coords 6,7), map 22 (test)
Exception: NoMethodError
Message: undefined method `npcn' for #<FriendSafari>

***Full script:
pbSafariPC

Backtrace:
[Lin's Friend Safari] Safari_PC.rb:68:in `block in pbPCNPCSafari'
[Lin's Friend Safari] Safari_PC.rb:60:in `loop'
[Lin's Friend Safari] Safari_PC.rb:60:in `pbPCNPCSafari'
[Lin's Friend Safari] Safari_PC.rb:34:in `block in pbSafariNPCMenu'
[Lin's Friend Safari] Safari_PC.rb:28:in `loop'
[Lin's Friend Safari] Safari_PC.rb:28:in `pbSafariNPCMenu'
[Lin's Friend Safari] Safari_PC.rb:19:in `block in pbSafariPCMenu'
[Lin's Friend Safari] Safari_PC.rb:13:in `loop'
[Lin's Friend Safari] Safari_PC.rb:13:in `pbSafariPCMenu'
[Lin's Friend Safari] Safari_PC.rb:7:in `pbSafariPC'
 
Last edited:
I can't reproduce the error. Can you tell me what have you done before the error happened?
 
The first error oddly fixed it's self... once I added Blue's code.

the 2nd error happened when I went to the PC near Leaf and clicked Friend's register > check friend's data > Blue > then it crashed.
 
The second one I figured why, but the first one I don't know why you have it. I have interacted with the pc near Blue without interacting with any other event on the map and I didn't get an error. Are you starting a new game when testing? Have you interacted with any other event before the one that throws the error?
 
I don't know. the PC near Blue is working now. but the one near Leaf isn't. But as long as I don't mess with that, it's fine.

Also I got this error while testing out the Safari part.
[2025-07-14 08:53:22 -0500]
[Pokémon Essentials version 21.1]

Exception: ArgumentError
Message: Invalid argument passed to method.
Expected nil to be one of [Symbol, GameData::Species, String], but got NilClass.

Backtrace:
Validation:29:in `validate'
GameData:100:in `get'
Pokemon:124:in `species='
[Lin's Friend Safari] Safari_Pokemon_Overwrite.rb:12:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Overworld_WildEncounters:446:in `pbGenerateWildPokemon'
Overworld_BattleStarting:421:in `block in generate_foes'
 
Back
Top