- Joined
- Sep 16, 2020
- Posts
- 9
fixed itYour file isn't public, nobody can see what it says. It's easier to just copy+paste a picture directly into your post, though.
fixed itYour file isn't public, nobody can see what it says. It's easier to just copy+paste a picture directly into your post, though.
I keep getting this Error
It says right here - you gave it a nil value where it was expecting a Pokemon, and it can't get the species from nothing. Look things over again and make sure you're putting in the right arguments.Message: undefined method `species' for nil:NilClass
***Full script:
pbMaxRaid(3, nil, [ ])
I tried all pokecommunity commands on that map and all are giving this error, even the ones I put the pokemon name, and before this command worked, a few days ago it stopped, but not on all maps in the game!It says right here - you gave it a nil value where it was expecting a Pokemon, and it can't get the species from nothing. Look things over again and make sure you're putting in the right arguments.
Why would you think the issue was the wrong command? I told you, it's that you didn't give it the right arguments. Look at the examples on that thread:I tried all pokecommunity commands on that map
Because you were putting it in the wrong place.and all are giving this error, even the ones I put the pokemon name,
If you compare the other events to the one you were having problems with, I bet you'll find that they have their arguments in the right order.and before this command worked, a few days ago it stopped, but not on all maps in the game!
yes as I said, I tested these Butterfree commands exactly as it is written there, I didn't change anything and I had the same problem, this command that you said is wrong was copied from pokemoncomunnity, it says "command for random raid with level random star" anyway, this same command is working perfectly on other maps. see an example I tested yesterday with a more detailed raid.Why would you think the issue was the wrong command? I told you, it's that you didn't give it the right arguments. Look at the examples on that thread:
View attachment 8668
in this case of this map, all the events that I create even with different id are giving this problem, so the player climbs a ladder to a different map and has the same event (in different map and with different id) and this raid works perfectly.Well technically, the way he set up his event SHOULD still work, because the nil rank he entered would just be converted into the appropriate rank number once an appropriate species was generated from the empty array. Its not the cleanest way to go about it, but its still a theoretically valid event.
Truth be told, I dont really know why its not working. This error seems to pop up from time to time with people, even though ive never been able to replicate it. Bad data seems to have somehow got saved to the event, so now its trying to load the Pokemon as an integer of zero instead of as a species. I have a rough idea as to why that may happen, but it would require just completely rewriting the Max Raid script to fix (which ill be doing for the v20 update).
For now, the best advice I can give is just to manually force your dens to reset by holding down CTRL while you access the den.
I noticed that the raids were resetting even after saving them on this map, for example: I looked and it was a croagunk, I canceled the event and opened it again and it turned into a snorlax! and it always changed, before that didn't happen. I don't know if this has anything to do with anything else if it helps :DWell technically, the way he set up his event SHOULD still work, because the nil rank he entered would just be converted into the appropriate rank number once an appropriate species was generated from the empty array. Its not the cleanest way to go about it, but its still a theoretically valid event.
Truth be told, I dont really know why its not working. This error seems to pop up from time to time with people, even though ive never been able to replicate it. Bad data seems to have somehow got saved to the event, so now its trying to load the Pokemon as an integer of zero instead of as a species. I have a rough idea as to why that may happen, but it would require just completely rewriting the Max Raid script to fix (which ill be doing for the v20 update).
For now, the best advice I can give is just to manually force your dens to reset by holding down CTRL while you access the den.
Hmm, well, the error seems to indicate that the "move_to_learn" variable is appearing within the drawPageFour method. Which would be the source of the problem, since there is no reason for the variable to be in that method, so it would make sense if it would be reporting an error of that variable being undefined there. So it sounds like a matter of somebody putting the wrong thing in the wrong place.Hello, your ZUD plugin is amazing and has worked flawlessy for months. However, I recently started a new Essentials project with EBDX and Gen 8 project. Now I get a summary error while the installation has been followed and checked by multiple people. All script changes have been applied. (Gen 8 now pre-compiles these scripts with yours merged!) The issue I have now is that Essentials crashes when opening a summary screen of a pokemon.
Error:
[Pokémon Essentials version 19.1]
[Generation 8 Project v1.1.2]
[EBDX v1.2.6]
Exception: NameError
Message: undefined local variable or method `move_to_learn' for #<PokemonSummary_Scene>
Backtrace:
275:UI_Summary:720:in `block in drawPageFour'
275:UI_Summary:714:in `each'
275:UI_Summary:714:in `drawPageFour'
275:UI_Summary:372:in `drawPage'
275:UI_Summary:1351:in `block in pbScene'
275:UI_Summary:1289:in `loop'
275:UI_Summary:1289:in `pbScene'
275:UI_Summary:1369:in `pbStartScreen'
274:UI_Party:658:in `pbSummary'
274:UI_Party:1303:in `block in pbPokemonScreen'
Could you please solve this for me by answering how to solve the undefined loval variable?
Thank you very much for your time and effort.
Regards,
Thomas
Thank you for hinting it towards placing the code in the wrong place! Your answer was very helpful. It now has been fixed. It simply was an issue of me and others overlooking wrongly placed code. :)Hmm, well, the error seems to indicate that the "move_to_learn" variable is appearing within the drawPageFour method. Which would be the source of the problem, since there is no reason for the variable to be in that method, so it would make sense if it would be reporting an error of that variable being undefined there. So it sounds like a matter of somebody putting the wrong thing in the wrong place.
The only reasons you would get a Ditto as your result is if:I checked the tutorial and even when I copied the examples, the ones I wanted to do made a ditto. I tried doing it on my own, it made a ditto. I am very confused, all I wanted to do was pull from the encounter table of the route I was on and that didn't work. Then I tried just specifying rank 1 grassland and it pulled a rank 2 ditto. After every attempt I reset my save file so I knew it wasn't just using the last raid there. Why wouldn't it work?
Also the ditto has 14 turns, even though it should be 10.
pbMaxRaid(nil, nil, [])
Oh, thanks. I didn't actually know about it needing to be on the tile that could generate encounters.The only reasons you would get a Ditto as your result is if:
A) The species you entered doesn't exist in your pokemon PBS data.
B) You entered a species or a form of a species that is banned from appearing in raids.
C) You entered a combination of criteria (Type, Habitat, Region, Raid Rank, etc) that cannot produce a viable species that matches those criteria.
D) You left the species as nil to draw a species from your current map, but the map/location of the raid event has no viable species to pull from. The placement of the raid event matters here (if its on a water tile, it'll only spawn species found as Surfing encounters, if its on a grass tile, it'll only spawn land encounters, etc).
E) You edited an existing Raid Den event that was spawning Ditto to spawn a new species instead, but never reset the initial event (through defeating/capturing the Pokemon, or manually resetting in Debug mode by holding CTRL upon entry).
F) Simply user error (typos, incorrectly setting up the den, etc).
It's hard for me to guess what your particular issue is, since I don't know how modified your game is and I don't know how exactly you're setting up your events. But I can assume it's probably either reasons C, D, E, or F, based on your description. Try testing a bit more by simplifying your raids.
Try creating a brand new event, (NOT simply editing an existing one) like this:
And see what happens. What SHOULD spawn is a random species with a rank that is adjusted to suit your current badge count, in whatever your default battle style is (1v1, 2v1, 3v1). This is the most generic possible raid you can make, so if it STILL spawns Ditto, there's a much deeper problem going on with your scripts.Ruby:pbMaxRaid(nil, nil, [])
If the event works as intended however, then the issue is simply on your end setting up improper events due to one of my outlined reasons above.
Yeah, otherwise it doesn't know what encounter table to be pulling from. I COULD have just made it pull from all encounter tables, but then if you put the raid event in the middle of a forest or something, it could randomly spawn surfing encounters as well (say, if you have a tiny pool somewhere on the map), which would be weird. So instead, the event checks if an encounter is available on the actual tile its on, and pulls from that encounter table. If no encounter is available on that tile (its on empty road or something), then it spawns Ditto since no encounters are available on that tile.Oh, thanks. I didn't actually know about it needing to be on the tile that could generate encounters.
=================
[2022-02-25 15:27:12 -0500]
[Pokémon Essentials version 19.1]
[Generation 8 Project v1.1.2]
[v19.1 Hotfixes 1.0.7]
Exception: NoMethodError
Message: undefined method `front_sprite_scale' for #<GameData::Species>
Backtrace:
340:EBDX_Wrapper_Compatibility:308:in `egg_sprite_bitmap'
[ZUD Plugin] Species Data.rb:186:in `sprite_bitmap_from_pokemon'
[ZUD Plugin] Pokemon Bitmaps & Icons.rb:96:in `setPokemonBitmap'
274:UI_Summary:125:in `pbStartScene'
274:UI_Summary:1350:in `pbStartScreen'
273:UI_Party:670:in `pbSummary'
273:UI_Party:1288:in `block in pbPokemonScreen'
273:UI_Party:1187:in `loop'
273:UI_Party:1187:in `pbPokemonScreen'
269:UI_PauseMenu:182:in `block (2 levels) in pbStartPokemonMenu'
Did you compile your game?I'm getting an error with this plugin (v1.1.4) and Generation 8 Project (v1.1.2) together. It seems that the latest G8P's custom sprite scaler doesn't talk well with the latest ZUD plugin... The error message is when I look at any Egg in Summary:
Edit: I also get the same error when an Egg hatches.
Let me try that again. I'm pretty sure it compiled yesterday, but it since hasn't been compiled.Did you compile your game?
Compiled, and still get the crash.Did you compile your game?
=================
[2022-02-25 16:11:09 -0500]
[Pokémon Essentials version 19.1]
[Generation 8 Project v1.1.2]
[v19.1 Hotfixes 1.0.7]
Exception: TypeError
Message: nil can't be coerced into Integer
Backtrace:
340:EBDX_Wrapper_Compatibility:136:in `*'
340:EBDX_Wrapper_Compatibility:136:in `refresh'
340:EBDX_Wrapper_Compatibility:39:in `initialize'
340:EBDX_Wrapper_Compatibility:309:in `new'
340:EBDX_Wrapper_Compatibility:309:in `egg_sprite_bitmap'
[ZUD Plugin] Species Data.rb:177:in `sprite_bitmap'
[ZUD Plugin] Pokemon Bitmaps & Icons.rb:131:in `setSpeciesBitmap'
297:UI_EggHatching:27:in `pbStartScene'
297:UI_EggHatching:172:in `pbStartScreen'
297:UI_EggHatching:186:in `block in pbHatchAnimation'
That one's definitely from not compiling, I helped someone with that same error the other day. Make sure the debug console says it's starting a full compile.Now I'm getting a different error: